would really appreciate any help on this one!
I have a string:
"<Cell 'test'.B45>"
I need to convert this to a tuple with only one object in it, so that looks like this:
((<Cell 'test'.B45>))
So to do this I have tried:
string = "<Cell 'test'.B45>"
tuple = eval(string)
this returns:
SyntaxError: invalid syntax
I think that this is because of the special values ("<",">", "'") in the string (removing them seems to work but I need them here)
Am I right here? and is there a way round this? note I have also tried using the method:
tuple = ast.literal_eval(string)
with the same result.