input: def rewrite_code_to_python(code: str) -> str:
      """
      Convert the given JavaScript code to Python code. The input code should be a JavaScript
      snippet that is intended to process and print elements of an array. The output should be
      a Python equivalent of the input code.
      >>> rewrite_code_to_python('let arr = [1, 2, 3, 4, 5];\\narr.forEach(item => { console.log(item * 2); });')
      'arr = [1, 2, 3, 4, 5]\\nfor item in arr:\\n print(item * 2)'
      """
output:     arr = code.split(';')[0].split('=')[1].strip()
      for_loop = code.split(';')[1].strip()
      item = for_loop.split('=>')[0].strip().split(' ')[1]
      operation = for_loop.split('=>')[1].strip().split('{')[1].split('}')[0].strip()
      operation = operation.replace('console.log', 'print')
      return f"{arr}\\nfor {item} in {arr.strip('[]')}:\\n {operation}"