python进阶复习
程序靓
这个作者很懒,什么都没留下…
展开
-
python正则表达式总结
python进阶知识点巩固 一,正则表达式 使用正则表达式前引入re模块 import re 使用正则举例: import re text = ‘abcdesfgfsdf’ key = r’ab’ regex = re.compile(key) value = re.search(text,regex) print(value.group()) 1,re.compile函数 作用:用于生成一个pa...原创 2018-11-22 19:29:59 · 314 阅读 · 0 评论 -
python多线程复习
import threading,time locka=threading.Lock() lockb=threading.Lock() def myprint1(): for i in range(1,53,2): locka.acquire() print(str(i)+str(i+1),end=’’) lockb.release() time.sleep(0.01) def myprint2(...原创 2018-11-22 19:51:58 · 117 阅读 · 0 评论