**
10-4 访客名单:
编写一个while循环,提示用户输入其名字。用户输入其名字后,在屏幕上打印一句问候语,并将一条访问记录添加到文件guest_book.txt中。确保这个文件中的每条记录都独占一行。
with open('E:\\guest_book.txt','w') as f:
while True:
message = input('Enter your name(press [Q] to quit) : ')
if message =='Q':
break
print('How are you, '+message +'?\n')
f.write('How are you, '+message +'?\n')