摘要:
# __author__ = '19134' res = [i*2 for i in range(10)] #相当于 res2 = [] for i in range(10): res2.append(i*2) print(res[2:]) print(res[:]) print(res2) def func(i): "此处补充一个装B效果" return i*3 res3 = [func(i) 阅读全文
摘要:
python代码默认规则,开发时,建议一行代码不要超过80个字符,如果超过,可按以下形式编写 with open("testfilename","r",encoding='utf-8') as f ,\ open("otherfile","r",encoding='utf-8') as f2: fo 阅读全文