diff --git a/func.py b/func.py index 98d558a..fbdafc1 100644 --- a/func.py +++ b/func.py @@ -1,3 +1,4 @@ +def s(): total = [] while True: unit= input("请输入:") diff --git a/sb.py b/sb.py new file mode 100644 index 0000000..2afdb49 --- /dev/null +++ b/sb.py @@ -0,0 +1,8 @@ +x=[1,2,3,4,5,6,7] +def s(x): + c=0 + for i in x: + c=c+i + return c +e=s(x) +print(e) \ No newline at end of file