Hello All. I am new in python and let me explain what do I need…
I have to add some variables to a program using raw_input so I have 3 variables, name_input, value_input and description_input, after type these inputs I create the following code:
print (value_input)
Name = ['name', name_input ]
Value = ['value', value_input]
Description = ['description', description_input]
print (Value)
The problem is when the value_input has a backslash, for example
value_input = "Value \ parameter null "
The value from value_input was typed with raw_input.
The output is…:
>>> Value \ parameter null
>>> ['value', 'Value \\ parameter null']
Why a backslash is added? how can I avoid this?
I did some tests with append and the same behaviour.
The goal is get the following:
["['name', parameter 1]", ['value', 'true \ not modify'], ['description', 'any description']"]
but I got this…
["['name', parameter 1]", ['value', 'true \\ not modify'], ['description', 'any description']"]
I hoe anyone can help me!!!
Thanks in advance.