input: Write a function to optimize the given Python program by replacing the loop that prints each number in the list with a more efficient method. If the given list is empty, the function should return an empty string.
  assert optimize_print([1, 2, 3, 4, 5, 6])=='1\n2\n3\n4\n5\n6'
  assert optimize_print([])==''
  assert optimize_print([10, 20, 30])=='10\n20\n30'
  assert optimize_print([7])=='7'
  assert optimize_print([-1, -2, -3])=='-1\n-2\n-3'
output: def optimize_print(lst):
      return '\n'.join(map(str, lst)) if lst else ''