Python Dictionary Not Returning New Value Like I Wanted
问题 So clearly Im doing something wrong. Im a new python/noob coder so it may be obvious for many of you but Im not sure what to do. class hero(): """Lets do some heros shit""" def __init__(self, name="Jimmy", prof="Warrior", weapon="Sword"): """Constructor for hero""" self.name = name self.prof = prof self.weapon = weapon self.herodict = { "Name": self.name, "Class": self.prof, "Weapon": self.weapon } self.herotext = { "Welcome": "Greetings, hero. What is thine name? ", "AskClass": "A fine name