input: Write a function to optimize a Python algorithm to find the greatest 2 numbers from a 10000 integers list. The function should return the two greatest numbers. If the list is empty or contains less than 2 numbers, it should return an appropriate message.
  
  def get_greatest_2(items):
      if not items or len(items) < 2:
          return "List is too short."
      max1 = max2 = 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]
  assert get_greatest_2(myList) == (10, 9)
  assert get_greatest_2([3, 5, 7, 8]) == (8, 7)
  assert get_greatest_2([]) == "List is too short."
  assert get_greatest_2([2]) == "List is too short."
  assert get_greatest_2([6, 6, 6, 6]) == (6, 6)
output: def get_greatest_2(items):
      if not items or len(items) < 2:
          return "List is too short."
      max1 = max2 = float('-inf')
      for item in items:
          if item > max1:
              max1, max2 = item, max1
          elif item > max2:
              max2 = item
      return max1, max2