How can i replace ("\") with ("/") in python?
a = ("Hello/World")
b = a.replace("/","\")
print(b)
i was expected that i'll successfully replace but i'm getting an error EOL error
How can i replace ("\") with ("/") in python?
a = ("Hello/World")
b = a.replace("/","\")
print(b)
i was expected that i'll successfully replace but i'm getting an error EOL error
Try this:
a = ("Hello/World")
b = a.replace("/","\\")
print(b)
Output:
Hello\World