摘要: 面条版def register(): while True: username = input('pls input your name:').strip() with open (path.user_info_path, 'rt', encoding='utf-8') as f: data = f 阅读全文
posted @ 2018-07-31 16:42 len1028 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #in the bar #use time 1.000830888748169 import time current_userinfo={'user':None} def auth(engine='file'): def outter(func): #func=最原始的index def wrap 阅读全文
posted @ 2018-07-16 21:54 len1028 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1.1...................................................................................................... 数据类型分类.. 6 1.1.1............................ 阅读全文
posted @ 2018-07-12 10:04 len1028 阅读(125) 评论(0) 推荐(0) 编辑
摘要: filter(lambda x:x%3==0,range(10)) [0,3,6,9] 会把0和false过滤掉 map(lambda x:x**2,range(10)) [0,1,4,9,16,25,36,49,64,81] 阅读全文
posted @ 2018-07-10 23:46 len1028 阅读(99) 评论(0) 推荐(0) 编辑
摘要: # _*_coding:utf-8_*_# Author:len liumenu = { "四川省":{ "成都市":{ "一区":["一县","二县"], "二区":["一一县","二二县"] }, "自贡市":{ "三区":["4县","4.5县"], "四区":["6县","6.6县"] } 阅读全文
posted @ 2018-07-04 11:33 len1028 阅读(228) 评论(0) 推荐(0) 编辑
摘要: # _*_coding:utf-8_*_# Author:egon'''dbfile 格式为 egon,egon123,100len,123,0wxx,123,0lxx,123,100cls,123,361''' import osproduct_list = [['Iphone7',5800], 阅读全文
posted @ 2018-07-02 17:11 len1028 阅读(199) 评论(0) 推荐(0) 编辑
摘要: # _*_coding:utf-8_*_# Author:len liu'''user_passwd.txt 文件格式为 egon|egon123|len|len123|wxx|123|lxx|456'''shop_list = [("iphone",5000),("coffer",80),("疙瘩 阅读全文
posted @ 2018-07-02 13:49 len1028 阅读(239) 评论(0) 推荐(0) 编辑
摘要: #一:str基本使用# 1 用途:记录的是描述性质的状态,比如名字,爱好,家庭地址 # 2 定义方式:在单引号、双引号、三引号内包含的一串字符# msg="hello 'world'" #msg=str("hello 'world'") # res1=str(1) # 可以将任意数据类型都转成字符串 阅读全文
posted @ 2018-07-01 12:10 len1028 阅读(92) 评论(0) 推荐(0) 编辑
摘要: # _*_coding:utf-8_*_# Author:len liuimport sys,timefor i in range(50): sys.stdout.write("#") sys.stdout.flush() time.sleep(0.1) if i == 24: sys.stdout 阅读全文
posted @ 2018-06-29 16:09 len1028 阅读(151) 评论(0) 推荐(0) 编辑
摘要: >>> with open(r'C:\Users\lhq\Desktop\haha.txt','r+') as f: f.seek(7)f.write('l+++') 74 f.read(10) 读10行 f.tell() 读取当前光标位置 #这个语句可以自动关闭句柄,使用中r为可读w为写,但w没有 阅读全文
posted @ 2018-06-26 17:15 len1028 阅读(76) 评论(0) 推荐(0) 编辑