Answers for "how to add a string to a variable in pythoin"

2

how to give a string value variable in python

foo = "bar"
exec(foo + " = 'something else'")
print bar
something else
Posted by: Guest on April-04-2021

Code answers related to "how to add a string to a variable in pythoin"

Python Answers by Framework

Browse Popular Code Answers by Language