Python Forum
Trying to make a tvshow/anime list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to make a tvshow/anime list
#1
I having problem with this part of my code.
I been trying to do so choice_4 : Choice_5 so the choice4 is the key while choice 5 is the value/des inside of the key.
but everything I tryed have failed.
i want so dictinary_TV[choice_1][choice_2].update({dict_key_maker}) will have the new key and the value.
But just can't find out how to do it.
Anyone who have tips?
  choice_1 = input("Option: Anime, TV Show, Save or Quit: ").capitalize()
    if choice_1 in dictinary_TV.keys():
        choice_2 = input("What genre you wanna go do?: ").capitalize()
        if choice_2 in dictinary_TV["Anime"].keys():
         choice_3 = input("Option: Add or View: ").capitalize()
         if choice_3 == "Add":
          choice_4 = input("Write name of the show: ")
          choice_5 = input("description of the show: ")
          dict_key_maker: 
          dictinary_TV[choice_1][choice_2].update({dict_key_maker})
Reply
#2
Ended up fixing it
removed dict_key_maker:
and cahnged the code on line 10 to
dictinary_tv[choice_1][choice_2][choice_4] = choice_5
Reply


Forum Jump:

User Panel Messages

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