I have an array/list of strings that contain a single backslash.
stringArray = ['this \\ is', 'a \\ sample', 'backslash \\ text']
When I print them in the console separately they are displayed exactly as they are intended to (considering that to write a single backslash you need to type two backslashes):
print(stringArray[0])
print(stringArray[2])
Outputs:
this \ is
backslash \ text
But whenever I print one or more elements of the array, the double backslash comes in:
print(stringArray)
Outputs:
['this \\ is', 'a \\ sample', 'backslash \\ text']
I have tried several methods to generate arrays and they always have the same result. Even by writing one single backslash in the strings the result is exactly the same. Why could this be happening and how can I get a list of strings with single backslashes?