Answers for "loop with two variables python"

17

python loop two

for f, b in zip(foo, bar):
    print(f, b)
Posted by: Guest on March-30-2020
5

multiple variables in for loop python

>>> for i, j in [(0, 1), ('a', 'b')]:
...     print('i:', i, 'j:', j)
...     
i: 0 j: 1
i: a j: b
Posted by: Guest on July-03-2020
0

multiple variables in for loop python

for i, j in zip(range(x), range(y)):
    # Stuff...
Posted by: Guest on July-03-2020
1

for i in a for j in a loop python

for i, j in zip(range(x), range(y)):
  ...
Posted by: Guest on March-02-2020

Code answers related to "loop with two variables python"

Python Answers by Framework

Browse Popular Code Answers by Language