input: Write a function to translate the given JavaScript code into Python code. The JavaScript code initializes an array with values [1, 2, 3, 4, 5], and then uses forEach to iterate through each item in the array, logging the result of multiplying each item by 2 to the console. The Python code should achieve the same functionality.
  
  def translate_js_to_python():
      arr = [1, 2, 3, 4, 5]
  
      for item in arr:
          print(item * 2)
  
  assert translate_js_to_python() == """1\n2\n3\n4\n5\n"""
  assert translate_js_to_python() == """2\n4\n6\n8\n10\n"""
output: def translate_js_to_python():
      arr = [1, 2, 3, 4, 5]
      result = []
      for item in arr:
          result.append(item * 2)
      return "\n".join(map(str, result))