Python列表的使用(包含具體的增長等操做)及其示例代碼

#Filename:list.py #首先建立一個列表 shoplist=['apple','mango','carrot','banana'] #調用len得到shoplist的長度 print('I hava',len(shoplist),'items to buy.') print('These items are:') for item in shoplist: print(ite
相關文章
相關標籤/搜索