随笔分类 -  python

python 学习笔记
摘要:pycharm -->settings -->editor --> file and code templates --> python script: #-- coding = utf-8 -- #@Time : ${DATE} ${TIME} #@Author : Annzi #@File : 阅读全文
posted @ 2022-03-13 22:06 Annzi-Py 阅读(37) 评论(0) 推荐(0)
摘要:pycharm可以设置的国内pip镜像源: 清华: https://pypi.tuna.tsinghua.edu.cn/simple 豆瓣: http://pypi.douban.com/simple/ 阿里: http://mirrors.aliyun.com/pypi/simple/ 查看目前安 阅读全文
posted @ 2022-03-13 21:24 Annzi-Py 阅读(96) 评论(0) 推荐(0)
摘要:import re import time import os.path work_dir = os.getcwd() + '\\' file_time = time.strftime("%y%m%d%H%M%S") file_name = "" terminal_words = "" freque 阅读全文
posted @ 2021-10-20 20:30 Annzi-Py 阅读(345) 评论(0) 推荐(0)
摘要:import re s = r'^(?P<path>(?:[a-zA-Z]:)?\\(?:[^\\\?\/\*\|<>:"]+\\)+)(?P<filename>(?P<name>[^\\\?\/\*\|<>:"]+?)\.(?P<ext>[^.\\\?\/\*\|<>:"]+))$' file_d 阅读全文
posted @ 2021-10-20 17:33 Annzi-Py 阅读(1326) 评论(0) 推荐(0)
摘要:lst1 = [1, 5, 6, 78, 95, 34, 56, 51, 5, 25, 55, 4, 5, 45, 25, 44, 54, 4] def bubble_sort(lst): """ 冒泡排序 :param lst: input list; :return: sorted list; 阅读全文
posted @ 2021-10-20 10:09 Annzi-Py 阅读(41) 评论(0) 推荐(0)
摘要:# print star_tower func; def star_tower(char="*", num=7): """ Based on observations of the model, n = floors: * # 12 - [2*n-2*i]=12 and 1 * [2*i-1]=1 阅读全文
posted @ 2021-10-20 09:12 Annzi-Py 阅读(294) 评论(0) 推荐(0)