import shelve
shelfFile=shelve.open('.\\Data\\mydata')
cats=['zophei','pookia','simon']
shelfFile['cats']=cats
shelfFile.close()

shelfFile=shelve.open('.\\Data\\mydata')
print(type(shelfFile))
print(shelfFile['cats'])
print(type(shelfFile['cats']))
print(list(shelfFile['cats']))
shelfFile.close()

import pprint
cats=[{'name':'syf','age':'desx'},{'name':'syfss','age':'seven'}]
pprint.pformat(cats)
fileObject=open('.\\Data\\myCats.py','w')
fileObject.write('cats='+pprint.pformat(cats)+'\n')
fileObject.close()


























































































































































































































































































































