import re f = open('whodata.txt', 'r') for eachLine in f.readlines(): print re.split('\s\s+', eachLine) f.close()