#List and data as dictionary
allCats =[]

allCats.append({'name':'Zophie','age':7,'color':'gray'})
allCats.append({'name':'Pooka','age':5,'color':'white'})
allCats.append({'name':'Fat-Tail','age':5,'color':'gray'})

print(allCats)


# Tic Tac Toe
import pprint

theBoard={'top-L':' ','top-M':' ','top-R':' ', 'mid-L':' ','mid-M':' ','mid-R':' ','low-L':' ','low-M':' ','low-R':' '}

pprint.pprint(theBoard)

x='mid-M'
theBoard[x]='X'
print('')
print("Now "+str(x) +" is taken")

pprint.pprint(theBoard)


o='top-L'
theBoard[o]='O'
print('')
print("Now "+str(o) +" is taken")

pprint.pprint(theBoard)


x='mid-L'
theBoard[x]='X'
print('')
print("Now "+str(x) +" is taken")

pprint.pprint(theBoard)


def printBoard(board):
    print(board['top-L']+'|'+board['top-M']+'|'+board['top-R'])
    print('-----')
    print(board['mid-L'] + '|' + board['mid-M'] + '|' + board['mid-R'])
    print('-----')
    print(board['low-L'] + '|' + board['low-M'] + '|' + board['low-R'])

printBoard(theBoard)

