Answers for "Use a loop to iterate over List item by item"

2

iterate through a list

my_list = ["Hello", "World"]
for i in my_list:
  print(i)
Posted by: Guest on November-30-2020
1

iterating over elements of list

# Python3 code to iterate over a list
list = [1, 3, 5, 7, 9]
  
# Using for loop
for i in list:
    print(i)
Posted by: Guest on June-15-2021

Code answers related to "Use a loop to iterate over List item by item"

Python Answers by Framework

Browse Popular Code Answers by Language