input: Write a python function to search for a name in a list of names and return its index or -1 if not found.
  assert search(['Alice', 'Bob', 'Charlie'], 'Bob') == 1
  assert search(['Alice', 'Bob', 'Charlie'], 'Eve') == -1
  assert search(['Alice', 'Bob', 'Charlie'], 'Charlie') == 2
output: def search(names, target):
      try:
          return names.index(target)
      except ValueError:
          return -1