main.py
from car import Car
def main():
car_list = []
while True:
brand = input('Marke > ')
if brand != '':
car = Car()
car_list.append(car)
car.brand = brand
model = input('Modell > ')
car.model = model
construction = input('Baujahr > ')
car.construction = construction
else:
break
for car in car_list:
print(car.construction)
print(car.brand)
print(car.model)
if __name__ == '__main__':
main()
from dataclasses import dataclass
@dataclass
class Car:
"""
a car
"""
brand: str
model: str
construction: int
if __name__ == '__main__':
pass