Commit eddc92a6 by BellCodeEditor

save project

parent 51a4cd42
Showing with 19 additions and 8 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
try:
b = int(b)
except:
print("输入错误")
else: else:
total.append(unit) list.append(b)
print(total) return list
new_input() def s(o):
\ No newline at end of file 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