Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dictionary question
#1
Hey All

I have a dictionary as such

car_dictionary = {
    "Ford" : "Blue",
    "Nissan" : "Red"
}
I want to assign a parameter (or is it argument) to the key/value so they are labelled as "make" and "color"
That way I can maybe print out something like "The Nissan is red"

How can I do this?
Reply


Messages In This Thread
Dictionary question - by kam_uk - Nov-21-2020, 02:07 AM
RE: Dictionary question - by buran - Nov-21-2020, 07:26 AM
RE: Dictionary question - by kam_uk - Nov-21-2020, 12:33 PM
RE: Dictionary question - by perfringo - Nov-21-2020, 05:19 PM
RE: Dictionary question - by deanhystad - Nov-21-2020, 03:01 PM
RE: Dictionary question - by kam_uk - Nov-21-2020, 08:18 PM
RE: Dictionary question - by deanhystad - Nov-21-2020, 08:42 PM
RE: Dictionary question - by ndc85430 - Nov-22-2020, 05:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  dictionary question stereokim123 2 32,916 Apr-01-2021, 10:23 PM
Last Post: stereokim123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020