Answers for "python how to iterate through a list of lists"

73

python loop through list

list = [1, 3, 6, 9, 12] 
   
for i in list: 
    print(i)
Posted by: Guest on June-25-2019
4

python iterate list

lst = [10, 50, 75, 83, 98, 84, 32]
 
for x in range(len(lst)): 
    print(lst[x])
Posted by: Guest on August-27-2020
0

python how to iterate through a list of lists

>>> a = [[1, 3, 4], [2, 4, 4], [3, 4, 5]]
>>> a
[[1, 3, 4], [2, 4, 4], [3, 4, 5]]
>>> for list in a:
...     for number in list:
...         print number
...
1
3
4
2
4
4
3
4
5
Posted by: Guest on March-02-2022

Code answers related to "python how to iterate through a list of lists"

Python Answers by Framework

Browse Popular Code Answers by Language