2017年8月3日

Guess 任意猜

摘要: 1 age_of_oldboy = 56 2 count = 0 3 while count <3: 4 guess_age = int(input("guess age:")) 5 if guess_age == age_of_oldboy: 6 print ("yes,you got it.") 阅读全文

posted @ 2017-08-03 23:16 aiaiduo 阅读(117) 评论(0) 推荐(0) 编辑

读取txt内文件内容

摘要: 命令如下: f = open("c:\\1.txt","r") lines = f.readlines()#读取全部内容 for line in lines print line 实例 如下: f = open("D:\\Python project\\Part 1\\script\\user.tx 阅读全文

posted @ 2017-08-03 23:14 aiaiduo 阅读(237) 评论(0) 推荐(0) 编辑

导航