video6 8 Extracting Iterating Through values from nested dictionaries

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ต.ค. 2024

ความคิดเห็น • 15

  • @krishnapriyachoudhary6555
    @krishnapriyachoudhary6555 ปีที่แล้ว +1

    Hands down, the easiest explanation on nested dictionaries.

  • @tarassavchenko2317
    @tarassavchenko2317 4 ปีที่แล้ว +7

    this is the best video about nested dictionaries I've founded,thank you

  • @fathom70k
    @fathom70k 2 ปีที่แล้ว

    I swear this is the only good video on this topic 😂 Thanks so much, dude.

  • @awhite17
    @awhite17 2 ปีที่แล้ว +1

    Thank you! This is common with api json, databases, and CSVs. This was the most straight forward example I have seen 🙌🏾

  • @cosmicazur
    @cosmicazur 3 ปีที่แล้ว +2

    Brilliantly demonstrated a complicated topic.

  • @Dovahkiin7994
    @Dovahkiin7994 2 ปีที่แล้ว

    Well Explained in simple words. Thanks for the content.

  • @chrisgilmore4655
    @chrisgilmore4655 2 ปีที่แล้ว

    Thanks! This explained how to loop list/dictionaries perfectly. Awesome video!

  • @billngidi8516
    @billngidi8516 3 ปีที่แล้ว +1

    Thanks alot for this video. I was really confused esp when it came to using the .items() method/function.
    You cleared it all up💪🏽

  • @SarahSchon-fn6rx
    @SarahSchon-fn6rx 7 หลายเดือนก่อน

    Brillant!!!!

  • @DanielRowlands1
    @DanielRowlands1 ปีที่แล้ว

    How would you print the secondary keys/values for each key, sorted by a chosen secondary key? E.g print each record sorted by age

  • @adrianaviana3276
    @adrianaviana3276 ปีที่แล้ว

    how can i insert the result of the:
    for key in unit:
    for value in key:
    print(value,":", key[value])'
    in a dictionary paython?

  • @joeyshem7506
    @joeyshem7506 2 ปีที่แล้ว

    What if you want to output lets say only names

  • @barath9939
    @barath9939 2 ปีที่แล้ว

    how we access this dictionary key,values
    india{"Newdelhi":{"delhi":"captial", "maharastra":heritage", "telangana:Hyderabad"},
    "gujarat":{"aaaamabad":"captial", "raipur":"river"}}"

  • @tooyt9866
    @tooyt9866 3 ปีที่แล้ว

    Hi there. Thanks for the vid. Would you be so kind to tell me why my code is not working?
    I need to compare the dates from the dictionaries with the day given as "current".
    Also please explain why the output is printed twice (8 lines for 4 dictionaries in the list "opts".
    # input
    opts=[
    {"type":"buy","date":"2020/12/15"},
    {"type":"buy","date":"2020/12/15"},
    {"type":"sell","date":"2020/12/14"},
    {"type":"sell","date":"2020/12/16"}
    ]
    current = "2020/12/15"
    for dictionary in opts:
    for key in dictionary:
    if key[1] < current:
    print('option expired')
    elif key[1] > current:
    print('option expires in future')
    else:
    print('option expires today')
    # output
    option expires in future
    option expires in future
    option expires in future
    option expires in future
    option expires in future
    option expires in future
    option expires in future
    option expires in future
    Thank you for the help.

    • @samarthshinde1830
      @samarthshinde1830 3 ปีที่แล้ว

      For dictionary in opts :
      for _ in dictionary :
      If dictionary [date] < current :