摘要:
import string,datetimeFILE_NAME = "user.txt" #常量def get_all_user(): users = {} with open(FILE_NAME,'a+',encoding="utf-8") as fr: fr.seek(0) for line i 阅读全文
摘要:
import stringFILE_NAME = "user.txt" #常量def get_all_user(): users = {} with open(FILE_NAME,'a+',encoding="utf-8") as fr: fr.seek(0) for line in fr: #xi 阅读全文
摘要:
list转字符串lst= ['a','b','c']"_".join(red_ball) 用前面的字符将序列元素连接成字符串。注意:序列中的元素必须是str!!!如果list元素是整型,需要先转成str。 >>>a_b_cl1= [1,2,3,4,5,6]l1= [str(i) for i in l 阅读全文