Commit d9e5f296 by BellCodeEditor

save project

parent 4c003739
Showing with 7 additions and 5 deletions
total = []
def d1_n(): def d1_n():
total = [] # total = []
while True: while True:
unit=input("输入:") unit=input("输入:")
if unit==" ": if unit==" ":
break break
try: try:
input("菜名") int(unit)
except: except:
print("输入菜名") print("输入合法字符")
else: else:
total.append(unit) total.append(unit)
print(total) return total
d1_n() d1_n()
# a = total
print(total)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment