摘要:
print('我考了%d分'%20) msg=''' ---------info of %s----------- name: %s age: %d #字符串不能放到%d处 job: %s salary: %f you will be retired in %s years #数字可以放到%s处 ---------end----------... 阅读全文
摘要:
>>> f=open("E:/pythonLearn/140.txt") >>> f.seek(8) #如果文件里是汉字的话,这地方seek括号里面只能是偶数,因为奇数的话就相当把汉字拆分成两半了。 >>> f.readline() 阅读全文
摘要:
>>> f=open("E:/pythonLearn/140.txt") >>> for line in f.readlines(): print(line) #在此连续点两次回车即可 阅读全文