for each item list python code example
Example 1: python foreach in a list
thislist = ["apple", "banana", "cherry"]
for x in thislist:
print(x)
Example 2: python iterate list
lst = [12, 123, 1234, 12345]
for i in lst:
print(i)
**********************result*********************
12
123
1234
12345