Commit eddc92a6 by BellCodeEditor

save project

parent 51a4cd42
Showing with 20 additions and 9 deletions
file=open(r"C:\Users\Administrator\Desktop\text.txt",'w',encoding="utf-8")
file.write('jntm')
file.close()
\ No newline at end of file
def new_input(): def new_input():
list=[]
total = []
while True: while True:
unit= input("请输入:") b = input("请输入数值")
if unit== 'q': if b == "q":
break break
else: try:
total.append(unit) b = int(b)
print(total) except:
new_input() print("输入错误")
\ No newline at end of file else:
list.append(b)
return list
def s(o):
zong =0
for i in o:
zong = zong+1
return zong #亻尔女子
\ No newline at end of file
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