Very new programmer here, sorry if this sounds stupid. I'm doing an exercise of http://www.swaroopch.com/notes/python/ in which I found that I needed to do something like this:
class Person():
"""Just creates a person with name, address and email"""
def __init__(self, name, address, email):
self.name = name
self.address = address
self.email = email
persons = {} #dictionary to store various persons as an address book, with each person's name as the key to their object
def changeperson():
"""This is going to be able to access any person in persons, and change their variables"""
persontochange = raw_input("What person do you want to change?")
thingtochange = raw_input("What do you want to change?")
result = raw_input("What should that be?")
#here assign to persons[persontochange].thingtochange the value of result, I don't know how
Sorry if this sounds stupid and for any problems with my English. Thanks for reading.