input: 
  def get_greatest_2(items: list) -> tuple:
      """ Optimize a Python algorithm to find the greatest 2 numbers from a list of integers.
      >>> get_greatest_2([1, 5, 3, 7, 4, 7, 8, 9, 2, 10, 6, 8])
      (10, 9)
      >>> get_greatest_2([1, 2, 3, 4, 5])
      (5, 4)
      >>> get_greatest_2([1])
      (1, None)
      """
      if len(items) < 2:
          return (items[0], None) if items else (None, None)
      max1, max2 = float('-inf'), float('-inf')
      for item in items:
          if item > max1:
              max1, max2 = item, max1
          elif item > max2:
              max2 = item
      return max1, max2
  
  myList = [1, 5, 3, 7, 4, 7, 8, 9, 2, 10, 6, 8]
  print('The greatest 2 numbers from the array:', get_greatest_2(myList))
  
  Output:
  The greatest 2 numbers from the array: (10, 9)
  
output:     
      if len(items) < 2:
          return (items[0], None) if items else (None, None)
      max1, max2 = float('-inf'), float('-inf')
      for item in items:
          if item > max1:
              max1, max2 = item, max1
          elif item > max2:
              max2 = item
      return max1, max2
  