def getTitleInfo():
 titles = {}
 with open('titles.txt', 'r') as f:
  for line in f:
   line = line.split('    ')
   if (line[1].strip() != 'N'):
    titles[line[0]] = [line[2], line[3].strip()]
 return titles

def getTitleInfo ( ) : titles = { } with open ( 'titles.txt' , 'r' ) as f : for line in f : line = line . split ( '    ' ) if ( line [ 1 ] . strip ( ) != 'N' ) : titles [ line [ 0 ] ] = [ line [ 2 ] , line [ 3 ] . strip ( ) ] return titles
read through titles .