'python - SyntaxError: unexpected character after line continuation character
I made this very simple one line code that is only supposed to start Hearthstone, I get the error "SyntaxError: unexpected character after line continuation character", and don't know why. Here's the code:
exec("C:\Program Files (x86)\Hearthstone\Hearthstone.exe")
Thanks in advance.
Solution 1:[1]
In python \ is a line continuation character and nothing can come after it on that line. To fix your problem use two backslashes \\ or simply one forward slash /.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | The Trident Guy |
