I am using Python 2.6+ and would like to append double quotes to a string and store it as a new string variable. I do not want to print it but use it later in my python script.
For example:
a = 'apple'
b = some_function(a) --> b would be equal to '"apple"'
How can I do this? All the solutions that I have looked at so far only work when printing the string.
'"' + a + '"'
a = "apple"
initially and will end up beinga = '"apple"'
unlessapple
is a variable and not a string to begin with