input: Write a function to rewrite the given JavaScript code in Python. The function should take a list of integers and print each element multiplied by 2. 
  assert rewrite_code([1, 2, 3, 4, 5])==[2, 4, 6, 8, 10]
  assert rewrite_code([2, 4, 6, 8, 10])==[4, 8, 12, 16, 20]
  assert rewrite_code([0, 0, 0, 0, 0])==[0, 0, 0, 0, 0]
  assert rewrite_code([])==[]
  assert rewrite_code([-1, -2, -3, -4, -5])==[-2, -4, -6, -8, -10]
output: def rewrite_code(lst):
      return [x * 2 for x in lst]