titles = ['james','tom','kim']
locations = [5,6,9]

find_str = input('Find Names (separated by space): ') 
terms = find_str.split()   # split entered string by delimiter space into a list

print('Searching for terms:', terms)
for t in terms:
  if t.lower() in titles:
    i = titles.index(t.lower())
    loc = locations[i]
    print("Found given term:", t, "on index:", i, " has location:", loc)