I am making a discord bot and want to create new instances of a class using user input, so essentially something like this:
class myclass:
def __init__(self):
pass
x = input(“”)
x = myclass()
Of course this doesn’t work and instead just name the class instance x. Is there any way to name the class instance what was inputted?
The contents of the class don’t matter, I am just interested in the name.