這是我的編碼迄今的程序,允許用戶創建一個清單
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