for loop syntax in python 3 code example
Example 1: for each loop python 3
# 'foreach' in python is done using 'for'
for val in array:
print(val)
Example 2: for loop example python 3
for num in nums:
for letter in 'abs':
print(num, letter)