input: Write a python function to find the largest element in a list.
  assert largestElement([3, 1, 4, 1, 5, 9, 2, 6, 5]) == 9
  assert largestElement([10, 20, 30, 40, 50]) == 50
  assert largestElement([-1, -2, -3, -4, -5]) == -1
output: def largestElement(lst):
      if not lst:
          return None
      largest = lst[0]
      for num in lst:
          if num > largest:
              largest = num
      return largest