Commit 2cafcc9e by BellCodeEditor

auto save

parent 94818d6d
Showing with 9 additions and 2 deletions
...@@ -4,6 +4,13 @@ def value_list(): ...@@ -4,6 +4,13 @@ def value_list():
value = input('请输入菜的价格(停止输入按q):') value = input('请输入菜的价格(停止输入按q):')
if value == 'q': if value == 'q':
break break
list.append(value) else:
try:
value1 = int(value)
except:
print('请输入数字哦')
else:
list.append(value)
print(list) print(list)
value_list() return list
print(value_list())
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