摘要: ''' 多进程: multiprocessing.Process(target=模块或类 ,args=()) Queue():队列 跟线程完全不相同 q = multiprocessing.Queue m1 = multiprocessing.Process(target=f,#args=queue 阅读全文
posted @ 2020-03-15 18:24 feichengwurao 阅读(555) 评论(0) 推荐(0) 编辑
摘要: # 正则是匹配字符串的import re# s='holle, world'# ret = s.replace('ll','xx')# hoxxe, world 替换# print(ret)# print(s.find('ll')) #查找 显示查找到2个# print(s.split(' '))# 阅读全文
posted @ 2019-12-25 22:13 feichengwurao 阅读(186) 评论(0) 推荐(0) 编辑
摘要: # import sys# print(os.getcwd()) F:\PYcharm\week1\day3 获取当前目录# print(r'F:\PYcharm\week1\day3') #修改当前目录 os.chdir() r 就是原字符# print(os.curdir) #. 当前路径# p 阅读全文
posted @ 2019-12-23 22:48 feichengwurao 阅读(376) 评论(0) 推荐(0) 编辑
摘要: #函数 # 1.减少重复代码# # 2.方便修改,更易扩展,具有加减功能# # 3.保持代码的一致性#调用函数一定记得加括号#参数# def add(x,y):# print(x+y)# add(2,3)# def f(形参)# pass 函数里的是形参 调用的是实参# f(实参)# def log 阅读全文
posted @ 2019-12-12 21:49 feichengwurao 阅读(258) 评论(0) 推荐(0) 编辑
摘要: # a = [1,2,1,3,4,1,5,'qiancheng','qiancheng']# b = set(a)# for i in a:# print(i)# SET 不能有重复的值# s = set(['qiangcheng','lixue'])# s.add('uu')# s.update( 阅读全文
posted @ 2019-12-10 23:21 feichengwurao 阅读(76) 评论(0) 推荐(0) 编辑