Answers for "how to insert variables in string python"

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 insert variables in string python"

Python Answers by Framework

Browse Popular Code Answers by Language