Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('\n'.join([''.join(['{:4}'.format(item) for item in row]) for row in list(map(lambda row: [(lambda: 0 if row[0] + y_idx < n - 1 else 2 if row[0] + y_idx > n - 1 else 1)() for y_idx, cell in enumerate(row[1])], enumerate([[0 for x in range(n)] for x in range(n)])))]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement