I transport data from command line to python. And I want to convert from string (command line) to tuple (python). But I have problem with \ charactor.
In command line, I using:
C:\>python music.py -a variable="?=="
In python:
#convert variable to array
variable_array = variable.split("==")
#convert to tuple
variable_tuple = tuple(variable_array)
I get variable_tuple = ("?","")
The result what I need is variable_tuple = ("\?","")
When using
C:\>python music.py -a variable="\?=="
The result is variable_tuple = ("\\?","")
How can I transport data from command line to get tuple ("\?","") in python? I need backslash for "?"