it's neither parameter nor argument
Unless you want to make a more complex data structure, what you want, as I understand it is
Unless you want to make a more complex data structure, what you want, as I understand it is
cars = {"Ford" : "Blue", "Nissan" : "Red"} # loop over all cars for car, color in cars.items(): print(f'The {car} is {color}') # or directly access the value for specific key car = 'Nissan' color = cars.get(car, 'unknown') print(f'The {car} is {color}')a more complex data structure (list of dicts)
cars = [{'make':"Ford", 'color':"blue"}, {'make':"Nissan", 'color':"red"}] for car in cars: print(f"The {car['make']} is {car['color']}")You can use different data structure, e.g. namedtuple, instead of dict or write your own class, etc.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs