这是我的编码迄今的程序,允许用户创建一个清单
numofthings=int(input("How many things do you need to pack? "))
numoftasks=int(input("How many tasks do you need to complete to prepare? "))
checklist1=[]
end=' '
while end.lower()!='end':
item=input("Please enter the things you need to pack and type 'End' when you're done: ")
checklist1.append(item)
end=item
checklist2=[]
end=' '
while end.lower()!='end':
task=input("What tasks do you have to complete and type 'End' when you're done ")
checklist2.append(task)
end=task
print(checklist1)
print(checklist2)
如何得到他们列表保存的项目到一个数组/列表? 另外我该如何做到这一点,以便他们只能列出他们说他们必须打包的物品数量?
我才开始编码2个星期前很抱歉,如果很明显,我已经忽略了它
你的问题是什么?有什么不符合你的期望? – FamousJameous