I have a class created for an object in Python. I want to create an instance with name given by the user.
class task:
def __init__(self, task , urgency):
self.task = task
self.urgency = urgency
I have a function which creates instance of the class "task" named 'create()', it needs 3 attributes name , task , urgency level. I want to convert name which is a string to a variable to store the task instance. Further I could use the name to change its property or use it somewhere else