input: Write a function to implement a linear search algorithm in Python that searches for an item in a given array. The function should return the position of the item if found, otherwise return -1. If the array is empty, the function should return -1.
  assert linearSearch('school')==0
  assert linearSearch('mall')==3
  assert linearSearch('library')==-1
  assert linearSearch('')==-1
  assert linearSearch([])==-1
output: def linearSearch(arr):
      if not arr:
          return -1
      for i in range(len(arr)):
          if arr[i] == 'school':
              return i
      return -1