the_board = {"top-L": " ", 'top-M': ' ', 'top-R': ' ',
'mid-L': ' ', 'mid-M': ' ', 'mid-R': ' ',
'low-L': ' ', 'low-M': ' ', 'low-R': ' '}
def printboard(board):
print(' {} | {} | {} '.format(board['top-L'], board['top-M'], board['top-R']))
print('---+---+---')
print(' {} | {} | {} '.format(board['mid-L'], board['mid-M'], board['mid-R']))
print('---+---+---')
print(' {} | {} | {} '.format(board['low-L'], board['low-M'], board['low-R']))
printboard(the_board) #call the printboard for the_board
Output :
| |
---+---+---
| |
---+---+---
| |