Skip to content

Instantly share code, notes, and snippets.

View keobox's full-sized avatar

cesare placanica keobox

View GitHub Profile
@keobox
keobox / cars.py
Last active November 6, 2021 08:56
Car database
class Car:
def __init__(self, name, color, hp):
self.name = name
self.color = color
self.hp = hp
car_db = {"alboreto": Car("Ferrari", "Red", 2000), "senna": Car("McLaren", "White", 2000)}
assert car_db["alboreto"].name == "Ferrari"
assert car_db["senna"].name == "McLaren"