From 04dd7972dd89c26e621c946c8b131228da4f1a2a Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 15 May 2022 16:39:00 +0800 Subject: [PATCH] save project --- diy.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 diy.py diff --git a/diy.py b/diy.py new file mode 100644 index 0000000..d620489 --- /dev/null +++ b/diy.py @@ -0,0 +1,11 @@ +with open(r'c:\Users\maku\Desktop\sales_list.txt','r',encoding='utf-8') as a: + s=a.readlines() +for i in s: + #print(i) + d=i.split() + #f=(d[1:]) + sum=0 + for o in d[1:]: + sum=sum+int(o) + r=d[0]+str(sum) + print(r) \ No newline at end of file -- libgit2 0.25.0