python loops
#x starts at 1 and goes up to 80 @ intervals of 2
for x in range(1, 80, 2):
print(x)
python loops
#x starts at 1 and goes up to 80 @ intervals of 2
for x in range(1, 80, 2):
print(x)
for loops python
text = "Hello World"
for i in text:
print(i)
#Output
#H, e, l, l, o, , W, o, r, l, d
for i in range(10):
print(i)
#1, 2, 3, 4, 5, 6, 7, 8, 9, 10
how to use a for loop in python
a_list = [1,2,3,4,5]
#this loops through each element in the list and sets it equal to x
for x in a_list:
print(x)
python for loop
# python for loop
#Range
for num in range(1,100+1):
print(num)
#step in range
for num in range(1,50,2):
print(num)
#Itration on lists
Countries = ["US","Russia","France","India","Japan"]
for country in Countries:
print(country)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us