
python
qqaazzww1234
这个作者很懒,什么都没留下…
展开
-
Python3中string的用法
import string1) string.ascii_letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'2)string.digits'0123456789'其他更多的用法使用help(string)生成200的随机优惠券(长度是20位的)import stringimport randomkey=string.asci...原创 2018-05-20 18:46:03 · 2017 阅读 · 0 评论 -
Python正则表达式
import rekey = r"<html><body><h1>hello world<h1></body></html>"#这段是你要匹配的文本(通过正则得到hello world)p1 = r"(?<=<h1>).+?(?=<h1>)&a原创 2018-06-05 19:55:27 · 1712 阅读 · 0 评论 -
Python遍历windows下所有目录
a=["c:\\","d:\\"]import osfor i in a: for root,dirs,paths in os.walk(i): for pathfile in paths: print(os.path.join(root,pathfile))原创 2018-06-19 09:40:20 · 4697 阅读 · 0 评论