class User(object):

    def __init__(self, name):
        self.name = name
users = {}
name = input('What name?')
users[name] = User(name)
print(users)
print(users['Andre'].name)
Creating dynamically named variables from user input