0

Say I wanna create a function that can generate a new variable from the user's input and also assign the user's input as a variable's name. Are there any solutions for this?

user_input = input('Assign a variable: ')

def newvariable(usr_variable):
    # code generate new variable name using the usr_variable argument.

0 Answers0