input: Write a python function to find the second largest element in a list.
  assert secondLargest([1, 2, 3, 4, 5, 6]) == 5
  assert secondLargest([10, 20, 4, 45, 99]) == 45
  assert secondLargest([2, 2, 3]) == 2
output: def secondLargest(nums):
      first, second = float('-inf'), float('-inf')
      for num in nums:
          if num > first:
              second = first
              first = num
          elif first > num > second:
              second = num
      return second