I was trying to read a txt file and convert it to a dictionary in python, the txt file has list of countries with their per capita income e.g "Quatar $129,700 Monaco $78,700,,,," when I tried to solve the problem the out put I am getting is " 'Quatar $129': 700 " I could not figure out why?
with open("dict.txt") as file:
for line in file:
(key, val) = line.split()
dictionary[int(key)] = val
print (dictionary)```