Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. s = [[str(e) for e in row] for row in gameStateQueue[0].gameMatrix]
  2. lens = [max(map(len, col)) for col in zip(*s)]
  3. fmt = '\t'.join('{{:{}}}'.format(x) for x in lens)
  4. table = [fmt.format(*row) for row in s]
  5. print('\n'.join(table))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement