python-CSD-kursu/python-temel/dict.open.py~

9 lines
191 B
Python
Raw Normal View History

2023-08-24 13:41:49 +03:00
d = dict()
with open('test.txt', 'r') as f:
for line in f:
if line.strip() == '':
continue
l = line.split(',')
d[1[0]] = l[1].strip()
print(d)