import pygame


def control(car, key):
    press = {pygame.K_UP: car.move_up, pygame.K_LEFT: car.move_left, pygame
        .K_DOWN: car.move_down, pygame.K_RIGHT: car.move_right}
    try:
        press[key]()
    except:
        pass

7a58989b1b07dc79f3117631e76895244e714dac
<mask token>

<mask token>


def control(car, key):
    press = {pygame.K_UP: car.move_up, pygame.K_LEFT: car.move_left, pygame
        .K_DOWN: car.move_down, pygame.K_RIGHT: car.move_right}
    try:
        press[key]()
    except:
        pass

import pygame


def control(car, key):
    press = {pygame.K_UP: car.move_up, pygame.K_LEFT: car.move_left, pygame
        .K_DOWN: car.move_down, pygame.K_RIGHT: car.move_right}
    try:
        press[key]()
    except:
        pass
