摘要:
import string # print(string.ascii_letters)#大小写 # print(string.ascii_lowercase) # print(string.ascii_uppercase) # print(string.digits) # print(string. 阅读全文
摘要:
文件操作模式 : 只读模式 r f=open('a.txt','r',encoding='utf-8') 不写时默认是r模式。可读不可写。 只写模式 w f=open('a.txt','w',encoding='utf-8') 可写不可读,写时会将原始内容清空。 追加模式 a f=open('a.t 阅读全文
摘要:
深拷贝: l = [0,1,2,2,3,4,5,6,7,8,9] # 0 1 2 3 4 5 6 7 8 9 10 import copy l2 = copy.deepcopy(l)#深拷贝,内存地址不一样 浅拷贝: l = [0,1,2,2,3,4,5,6,7,8,9] # 0 1 2 3 4 5 阅读全文