- 博客(4)
- 收藏
- 关注
原创 用pip下载模块(python)
用pip下载模块一直错误,参照网上各位大神的path设置路径后依然出错 出现了类似白色标记的‘拒绝访问问题’ 其实可直接参照黄线设置 在install 与所安装模块间加上--user即可成功安装
2021-08-30 17:22:21
254
原创 消除缺失的编号python
记录且分享平时学习所得 过程或许有些冗杂 #!python3 #creating a new dir,which exits lacing number #adding these number #1.cerating regex to mach the name, using '()'to ensure the lacking number import re,os,shutil def complenum(folder): format=re.compile(r"""^(.*).
2021-08-26 15:38:22
168
原创 选择性拷贝 python
#!python3 #to copy some files like '.pdf .jpg etc' #let me design it as a 'def' #1.searching a dir to find what you wannna import os,shutil os.chdir('C:\\Users\\DELL\\Desktop') #copy_year=open('.\\copy_year','w') open打不开文件夹? #os.makedirs('C:\\Users\...
2021-08-25 17:12:31
88
原创 生成随机测试试卷文件遇到问题
1. 对open理解 quizFile = open('captalsquiz%s.txt' % (quizNum + 1), 'w') open函数以写模式和添加模式打开不存在的文件时,可以自行创建文件、 2.创建答案选项 answerOptions = wrongAnswers + [correctAnswer] 为什么创建答案选项后面的‘correctAnswer’要加中括号?why? correctAnswer = capitals[states[questionNum...
2021-08-11 15:45:24
78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人