input: Write a function to optimize the given Python program that prints each element of a list on a new line. The function should take in a list as input and modify the program if necessary for better performance or readability. If the list is empty, the function should print an empty string.
  assert optimize_code([1, 2, 3, 4, 5, 6])==None
  # Output:
  # 1
  # 2
  # 3
  # 4
  # 5
  # 6
  assert optimize_code([])==None
  # Output:
  # <empty output>
output: def optimize_code(lst):
      if lst:
          for item in lst:
              print(item)
      else:
          print("")