Python Forum
[split] SyntaxError when trying to execute code on Windows - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: [split] SyntaxError when trying to execute code on Windows (/thread-28810.html)



[split] SyntaxError when trying to execute code on Windows - nehaya - Aug-04-2020

I would be happy to help me.
when I running this code :
print("""
 _    _
| |  | |
| |__| | __ _ _ __   __ _ _ __ ___   __ _ _ __ 
|  __  |/ _' | '_ \ / _' | '_ ' _ \ / _' | '_ \ 
| |  | | (_| | | | | (_| | | | | | | (_| | | | |
|_|  |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
                     __/ |
                    |___/
""")
I accepted this error:
^
Error:
SyntaxError: unexpected character after line continuation character



RE: [split] SyntaxError when trying to execute code on Windows - buran - Aug-04-2020

your code works for me.
post the full code you have. Sometimes the error may be on the previous line


RE: [split] SyntaxError when trying to execute code on Windows - nehaya - Aug-04-2020

the full code:
import random
print("""
 _    _
| |  | |
| |__| | __ _ _ __   __ _ _ __ ___   __ _ _ __ 
|  __  |/ _' | '_ \ / _' | '_ ' _ \ / _' | '_ \ 
| |  | | (_| | | | | (_| | | | | | | (_| | | | |
|_|  |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
                     __/ |
                    |___/
""")
random.randint(5, 10)