Simple question but I\'m struggling with it for too much time. Basically I want to split a string by \\ (backslash).
a = \"1\\2\\3\\4\"
Tr
You can split a string by backslash using a.split('\\').
a.split('\\')
The reason this is not working in your case is that \x in your assignment a = "1\2\3\4" is interpreted as an octal number. If you prefix the string with r, you will get the intended result.
\x
a = "1\2\3\4"
r