Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mydict = {}
- with open('random.txt','r') as f:
- spam = f.readlines()
- v = 0
- for line in spam:
- k = line.split()
- v +=1
- mydict[k] = v
- print mydict
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement