I have a string returnd from a software like \"(\'mono\')\" from that I needed to convert string to tuple .
\"(\'mono\')\"
that I was thinking using ast.literal_eval
ast.literal_eval
Convert string to tuple? Just apply tuple:
tuple
>>> tuple('(mono)') ('(', 'm', 'o', 'n', 'o', ')')
Now it's a tuple.