input: Write a function to optimize the given Python program that prints each element of a list on a new line. The function should accept a list of integers as input and print each element on a new line using an optimized approach. If the input list is empty, the function should print an appropriate message.
  assert optimize_print([1, 2, 3, 4, 5, 6])==None
  assert optimize_print([])==None
output: def optimize_print(lst):
      if not lst:
          print("The list is empty.")
      else:
          for num in lst:
              print(num)