Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def readFile(fileName):
- infile = open(fileName, 'r')
- firstLine = infile.readline()
- rows = infile.readlines()
- infile.close()
- info = {}
- for row in rows:
- cols = row.split(',')
- info[cols[0]], int(cols[2])
- return(info)
- data = readFile('data.txt')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement