0 votes
in Python by
What is the output of following code −

[ (a,b) for a in range(3) for b in range(a) ]

1) [ (1,0),(2,1),(3,2)]

2) [ (0,0),(1,1),(2,2)]

3) [(1,0),(2,1),(2,1)]

4) [ (1,0),(2,0),(2,1)]

1 Answer

0 votes
by

4) [ (1,0),(2,0),(2,1)]

...