Rotate an ASCII picture 90° clockwise.
Given:
grid = [['.','.','.','.','.','.'],
['.','O','O','.','.','.'],
['O','O','O','O','.','.'],
['O','O','O','O','O','.'],
['.','O','O','O','O','O'],
['O','O','O','O','O','.'],
['O','O','O','O','.','.'],
['.','O','O','.','.','.'],
['.','.','.','.','.','.']]
Print the grid rotated 90° clockwise (new rows = old columns reversed).
This is ATBS Ch.4 "Grid Printer", solved row-by-row.
The output should be 6 lines.Sign in to save your code and track progress across devices.