I am using python3 / version 3.6.9 and use a yml config file:
with open("config.yml", "r") as ymlfile:
cfg = yaml.load(ymlfile)
for section in cfg:
print(section)
Untill now i was only able to get this Output: BMW, Chevy, Mercedes
I want to loop through all elements of the config file and check the single values for Price, seats, year, that it's e.g. possible to filter the most seats, highest price.... individually. And it must be possible to extend the config file later without code change.
Thanks for every help
Cars:
BMW:
Price: 420
Seats: 4
Year: 2022
Chevy:
Price: 423
Seats: 5
Year: 1975
Mercedes:
Price: 424
Seats: 6
Year: 2000