+ 2
How can I enter two variables in the for loop?
2 Antworten
+ 10
Parham Shafiei Sabet
Example -
for i in array:
do_something(i)
One more things
If you need the index in the array for some reason (usually you don't), then do this -
for i, element in enumerate(array):
print("working with index", i)
do_something(element)
Hope this will help! Btw I think it can be even clear when you'll start the course..
+ 2
For i in range(2):
A=int(input ())
B=input()