Linked Questions

Popular Questions

Is there a way to define two objects but with one user input? To go deeper, there will be multiple preset dictionaries and I want to ask the user to identify which dictionary they want to use. Then two objects will be set using the input, one will be set to the input as a string (the name of the dictionary) and the other will be set to the dictionary itself.

Barney = {"Height": 100, "Weight": 200, "Hobby", "Fishing"}

input("Who do you want to talk to?")
print(PersonName, ":about:", PersonDict)
Who do you want to talk to?  *Barney*
Barney :about: {"Height": 100, "Weight": 200, "Hobby", "Fishing"}

Related Questions