for loop in python3 code example
Example 1: python loops
#x starts at 1 and goes up to 80 @ intervals of 2
for x in range(1, 80, 2):
print(x)
Example 2: for loop example python 3
for num in nums:
for letter in 'abs':
print(num, letter)
Example 3: for loop in python
data = [34,56,78,23]
sum = 0
# for loop is to iterate and do same operation again an again
# "in" is identity operator which is used to check weather data is present or not
for i in data:
sum +=i
print(sum)