#!/usr/bin/env python

f=open("people.txt","r")
#open the file, look at each line. The name and age are generally indicated by a space
#look for the spaces location with index and then slice the string accordingly.
people={}
for line in f:
    spaceidx=line.index(" ")
    people[line[:spaceidx]]=int(line[spaceidx+1:])

print people
