随笔分类 -  python

摘要:name = "jack" print(f"i'm {name}") print(F"i'm {name}") print("{1} and {0}".format("eggs", "spam")) print("this {food} is {adjective}".format(food="sp 阅读全文
posted @ 2024-10-14 11:04 EPIHPANY 阅读(25) 评论(0) 推荐(0) 编辑
摘要:os.listdir(path='.') Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order, and does not in 阅读全文
posted @ 2024-08-02 16:38 EPIHPANY 阅读(8) 评论(0) 推荐(0) 编辑
摘要:import datetime # 根据开始日期、结束日期返回这段时间里所有天的集合 def getDatesByDateInterval(start_day, end_day): result = [] date_start = datetime.datetime.strptime(start_d 阅读全文
posted @ 2024-02-18 10:19 EPIHPANY 阅读(61) 评论(0) 推荐(0) 编辑
摘要:在当前用户目录下的AppData\Roaming目录下新建pip目录,pip目录下新建pip.ini文件,pip.ini文件中内容如下: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] use-mirro 阅读全文
posted @ 2023-12-07 21:22 EPIHPANY 阅读(102) 评论(0) 推荐(0) 编辑
摘要:python版本:3.10.5 mysql版本: 8.0.27 oracle版本:oracle 12c 一、python连接mysql数据库 安装第三方依赖PyMySQL, 终端执行如下命令: pip install PyMySQL PyMySQL使用 import pymysql config = 阅读全文
posted @ 2023-12-06 21:48 EPIHPANY 阅读(117) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示