Pre-recorded question

Question #147
How to iterate over a list in Python?
Answer

In Python 3, to iterate over lists, simply use a for loop:

list = [1, 2, 4, 8, 16] 
for i in list: 
	print(i)


4 events in history
Answer by Alphonsio 08/27/2020 at 01:55:36 PM

In Python 3, to iterate over lists, simply use a for loop:

list = [1, 2, 4, 8, 16] 
for i in list: 
	print(i)


Answer by Alphonsio 08/27/2020 at 01:49:42 PM

In Python 3, to iterate over lists, simply use a for loop:

list = [1, 2, 4, 8, 16] 
for i in list: 
	print(i)


Answer by Alphonsio 08/27/2020 at 01:49:24 PM

In Python, to iterate over lists, simply use:

list = [1, 2, 4, 8, 16] 
for i in list: 
	print(i)


Question by Alphonsio 08/27/2020 at 01:47:26 PM
How to iterate over a list in Python?
# ID Query URL Count

Icons proudly provided by Friconix.