input: from typing import List
  
  def rewrite_code(code: str) -> str:
      """
      Given a code snippet in JavaScript, rewrite it in Python.
      >>> rewrite_code('// JavaScript code\\nlet arr = [1, 2, 3, 4, 5];\\narr.forEach(item => {\\n console.log(item * 2);\\n});')
      '# Python code\\narr = [1, 2, 3, 4, 5]\\n\\nfor item in arr:\\n print(item * 2)'
      """
output:     code = code.replace('// JavaScript code', '# Python code')
      code = code.replace('let ', '')
      code = code.replace('arr.forEach(item => {', 'for item in arr:')
      code = code.replace('});', '')
      code = code.replace('console.log(', 'print(')
      return code