LearnPy Hub
← Modules & the Standard Library problems
Hard

Grid Coordinates

Read r and c and print every coordinate pair from itertools.product(range(r), range(c)) as (i, j), one row of the grid per line.

Input

Two integers.

Output

r lines.

Sample 1

Input
2
3
Output
(0, 0) (0, 1) (0, 2)
(1, 0) (1, 1) (1, 2)

Sample 2

Input
1
1
Output
(0, 0)
solution.py
Output appears here
Grid Coordinates · Python practice problem · LearnPy Hub