python loop through list
list = [1, 3, 6, 9, 12]
for i in list:
print(i)
python loop through list
list = [1, 3, 6, 9, 12]
for i in list:
print(i)
how to print list using for loop in python
list = [1,"bob",4,"life",5]
# with loop
for i in list:
print(i)
>>> 1
bob
4
life
5
x = [print(i) for i in list]
>>> 1
bob
4
life
5
# without loop
print(*list, sep = ", ")
>>> 1, bob, 4, life, 5
print(' '.join(map(str, list)))
>>> 1 bob 4 life 5
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