contacts = {}
#trying to insert read code here to read from text file to a dictionary
with open('Contacts.txt', 'a+') as contacts_file:
contacts_file.write(str(str(contacts)))
contacts_file.close()
Disclaimer: Noob at python I am trying to create an address book/contact book. Yes, I know this could be done easier with classes and whatnot, but I have not learned them yet, and have gotten too far to rewrite the whole thing for my taste.
What the problem is for me, is that the output at the end of the code works fine and shows up good in the txt file, however I want to read that output back into a dictionary in python whenever the python file is started so I can modify/delete/search rather then just adding.