filename = 'guest.txt'
while True:
username = input('Please input you username(q to quit):')
with open(filename,'a') as file_object:
if username != 'q':
file_object.write(username + '\n')
else:
break
10-3 10-4
最新推荐文章于 2022-09-06 11:41:23 发布