Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def printpretty(x):
- for row in a:
- print(' '. join(row))
- n = int(input())
- a = [['1' if i == n - j - 1 else '0' if i < n - j - 1 else '2' for i in range(n)] for j in range(n)]
- printpretty(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement