From 4d1af6544dd75bb92d553c8982eb21d9ffb0f365 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 27 Mar 2021 10:22:04 +0800 Subject: [PATCH] auto save --- func.py | 18 ++++++++++++++++++ hhhhhhhhhh | 0 2 files changed, 18 insertions(+) create mode 100644 func.py create mode 100644 hhhhhhhhhh diff --git a/func.py b/func.py new file mode 100644 index 0000000..f472dd8 --- /dev/null +++ b/func.py @@ -0,0 +1,18 @@ +total = [] +def new_input(): + while True: + money=input("请输入(q退出)") + if money=="q": + break + else: + try: + money=int(money) + except : + print("请输入整数") + else: + total.append(money) + finally: + print("-"*30) + return total +result=new_input() +print(total) \ No newline at end of file diff --git a/hhhhhhhhhh b/hhhhhhhhhh new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/hhhhhhhhhh -- libgit2 0.25.0