Read data from a text file and assign the data value to a python dictinoary.
#!C:/Python23/python.exe
for line in open('c:\\Python23\\abc.txt','r'):
line=line.strip()
if not line:
continue
m,n=line.split()
print m
this code work fine but the value of m and n should be assign to a dictinory
['item1':100,'item2':200]
how can be this made possible
let me know
#!C:/Python23/python.exe
for line in open('c:\\Python23\\abc.txt','r'):
line=line.strip()
if not line:
continue
m,n=line.split()
print m
this code work fine but the value of m and n should be assign to a dictinory
['item1':100,'item2':200]
how can be this made possible
let me know