簡單的問題的列表,我有一個列表,如果列表的Python:索引列表
x = [['1','2','3'],['4','5','6'],['7','8','9']]
最新通過每個列表中的一個for循環索引的simpliest方式?例如
for i in x:
print 1st_list_in_list
print 2nd_list_in_list
print 3rd_list_in_list
編輯
讓我進一步闡述,我想打印每一個列表是怎麼回事例如
for i in x:
print 1st_list_in_list
print 2nd_list_in_list
將返回
1, 2,3
4, 5,6
我不知道你正在嘗試做的。你的例子的期望輸出是什麼? – sth 2010-07-11 19:14:42
你有沒有試過'爲我在x:打印我'?爲什麼不能滿足你的需求? – 2010-07-11 19:23:44
因爲我使用每個列表進入MySQL數據庫,我不想將整個列表輸入數據庫,我需要每個列表中的每個值 – Tahira 2010-07-11 19:26:43