I'm going to play guess-what-you-want, and assume the first numbers in each row are in fact some kind of sequential identifier, and you want
1 30 5
2 64 4
to become
1 : [30, 5]
2 : [64, 4]
so...
with open("dataFile.txt") as dataFile:
items = {}
for line in dataFile:
line = map(int, line.split()) #convert the text data to integers
key, value = line[0], line[1:]
items[key] = value
(and I've changed the name of file
because file()
is already a builtin function in Python, and reusing that name for something else is bad form).
Or you could use a dictionary comprehension instead, starting with your items list:
itemDict = {item[0]: item[1:] for item in items}