input: 
  def rewrite_to_list_comprehension(input_code: str) -> str:
      """ Replaces a for-loop with an equivalent list comprehension.
      >>> rewrite_to_list_comprehension("""even_numbers = []
      for i in range(1,21):
          if i % 2 == 0:
              even_numbers.append(i)""")
      'even_numbers = [i for i in range(1, 21) if i % 2 == 0]'
      """
  
output:     lines = input_code.strip().split('\n')
      variable_name = lines[0].split('=')[0].strip()
      start_range = lines[1].split('range(')[1].split(',')[0].strip()
      end_range = lines[1].split(',')[1].strip().rstrip('):')
      condition = lines[2].split('if ')[1].strip()
      return f"{variable_name} = [{lines[1].split('for ')[1].split(' in')[0].strip()} for {lines[1].split('for ')[1].split(' in')[0].strip()} in range({start_range}, {end_range}) if {condition}]"