I'm a newbie Python learner and having some issues while making practice on string operations.
Code:
string = 'param1/param2:\d+/param3'
print(string.split('/'))
Expected Result:
['param1', 'param2:\d+', 'param3']
Actual Result:
['param1', 'param2:\\d+', 'param3']
How can I prevent Python to prepend extra backslash to the backslash where this issue can be seen at the second element of the result array?