Answers for "Python How To Convert a String to Variable Name"

0

Python How To Convert a String to Variable Name

user_input = input("Enter string for variable name: n")
globals()[user_input] = 50
print(apple)
print(type(apple))
Posted by: Guest on January-28-2022

Code answers related to "Python How To Convert a String to Variable Name"

Python Answers by Framework

Browse Popular Code Answers by Language