# Python - 3.6.0

rental_car_cost = lambda d: d * 40 - (0 if (0 < d < 3) else (20 if (3 <= d < 7) else 50))

# Python - 3.6.0

rental_car_cost = lambda d: d * 40 - (0 if (0 < d < 3) else (20 if (3 <= d < 7) else 50))

# Python - 3.6.0