input: Write a function that translates a given JavaScript code snippet to Python code. The function should take a string of JavaScript code as input and return a string of equivalent Python code. The JavaScript code provided is for doubling each element in an array and printing the result.
  assert translate_code(`let arr = [1, 2, 3, 4, 5];
  
  arr.forEach(item => {
   console.log(item * 2);
  });`)==`arr = [1, 2, 3, 4, 5]
  
  for item in arr:
   print(item * 2)`
output: def translate_code(js_code):
      js_code = js_code.strip()
      lines = js_code.split('\n')
      arr_line = lines[0]
      arr_line = arr_line.replace('let ', '')
      arr_line = arr_line.replace(';', '')
      arr_line = arr_line.replace('=', '=')
      arr_line = arr_line.replace('[', '[')
      arr_line = arr_line.replace(']', ']')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
      arr_line = arr_line.replace(' ', '')
  