摘要:
源文件每行后面都有回车,所以用下面输出时,中间会多了一行 try: with open("F:\\hjt.txt" ) as f : for line in f: print(line) except FileNotFoundError: print("读取文件出错") 有两种方法处理: 1.print后面带 end='',表示不换行 t... 阅读全文
摘要:
active =True while active: message =input("\nPlease input your name:\n") if message =='q': break print("welcome " + message + " come to our website!") with open('guest_book... 阅读全文