What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-16 11:23:18
Dynamic Variable declaration in Python
#1st example user_input = raw_input("Enter a variable name : ") Enter a variable name: number globals()[user_input] = 25 # you can use locals to assign local variable # This is dynmic variable declaration #2nd example Class Table: def __init... Add solution