Guest User

Untitled

a guest
Dec 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. x = [[c for c in range(r)] for r in range(3)]
  2. print(x)
  3. >>>[[],[0],[0,1]]
  4.  
  5. x = []
  6. for r in range(3):
  7. for c in range(r):
  8. x.append(c)
  9. print(x)
  10. >>>[0,0,1]
Add Comment
Please, Sign In to add comment