Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help
#4
One way is to understand structure of the dictionary. Maybe this will help:

>>> d = {"id":1,"car":{"car_make":"Ford","car_model":"Club Wagon","car_year":1997},"price":"$5179.39","total_sales":446}
>>> d.keys()
dict_keys(['id', 'car', 'price', 'total_sales'])
>>> d['car'].keys()
dict_keys(['car_make', 'car_model', 'car_year'])
>>> d['car']['car_make'], d['total_sales']
('Ford', 446)
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
help - by just_me - Mar-24-2020, 10:42 AM
RE: help - by buran - Mar-24-2020, 11:02 AM
RE: help - by just_me - Mar-24-2020, 11:13 AM
RE: help - by perfringo - Mar-24-2020, 12:02 PM
RE: help - by just_me - Mar-25-2020, 02:08 PM
RE: help - by ndc85430 - Mar-25-2020, 02:43 PM
RE: help - by just_me - Mar-25-2020, 03:05 PM
RE: help - by ndc85430 - Mar-25-2020, 04:40 PM
RE: help - by just_me - Mar-25-2020, 04:58 PM
RE: help - by ndc85430 - Mar-28-2020, 02:52 PM

Forum Jump:

User Panel Messages

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