Python - How to append double quotes to a string and store as new string?

Viewed 60141

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.

4 Answers
Related