i want to know how to assign the output of print to a variable.
so if
mystring = \"a=\\\'12\\\'\"
then
print mys
If you have a string 'my_string' like this:
a=123 b=456 c='hello'
Then you can pass it to a function 'my_fun' like this:
my_fun(**eval('{' + my_string.replace(' ', ',') + '}'))
Depending on the precise formatting of my_string, you may have to vary this a little, but this should get you 90% of the way there.