I have to import a txt file onto python and import it in to a dictionary. I then have to get rid of the braces/curly brackets and then display it vertically, and I have no idea how to do that.
This is the code I have created so far:
Dictionary = {}
with open('Clues.txt', 'r') as f:
for line in f:
(key,val) = line[1], line[0]
Dictionary[key] = val
print(Dictionary)
At the moment this is being displayed:
{'&': 'L', '$': 'G', '£': 'J'}
But I need it to be displayed like :
'&': 'L'
'$': 'G'
'£': 'J'
I have tried everything and nothing is working, any ideas?