input: Write a function to perform a linear search on a given list of items and return the index of the item if it exists in the list. If the item does not exist, return -1. The list is predefined and contains various locations.
  assert linearSearch('hospital')==1
  assert linearSearch('mall')==3
  assert linearSearch('library')==-1
  assert linearSearch('school')==0
  assert linearSearch('theatre')==4
output: def linearSearch(item):
      locations = ['school', 'hospital', 'office', 'mall', 'theatre']
      for i in range(len(locations)):
          if locations[i] == item:
              return i
      return -1