from dataclasses import dataclass @dataclass class Vehicle: """What type of vehicle is going on the ferry.""" type: str registration: str height: int length: int ports = { "PORTSMOUTH": "GBPME", "PLYMOUTH": "GBPLY", "POOLE": "GBPOO", "CAEN": "FROUI", "CHERBOURG": "FRCER", "ST MALO": "FRSML", "LE HAVRE": "FRLEH", "ROSCOFF": "FRROS", } port_lookup = {code: name for name, code in ports.items()}