随笔分类 - Python练习题
练习题
摘要:class Restaurant: def __init__(self,restaurant_name,cuisine_type,number_served=7): self.resraurant_name=restaurant_name self.cuisine_type=cuisine_type
阅读全文
摘要:1、持续输入数据、输完之后退出 with open('test4.txt','w',encoding='utf-8') as f: while True: inp = input("请输入内容:") if inp == 'q': break f.write(inp + '\n') with open
阅读全文

浙公网安备 33010602011771号