Python Forum
[split] SyntaxError when trying to execute code on Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] SyntaxError when trying to execute code on Windows
#1
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
Reply
#2
your code works for me.
post the full code you have. Sometimes the error may be on the previous line
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 10 26,570 May-26-2025, 01:55 PM
Last Post: deanhystad
  [split] How to continue code after .show() in matplotlib? pythonnewbie62 1 813 Apr-28-2025, 04:02 PM
Last Post: deanhystad
  [split] another problem with code blakeusherremix68 0 865 Dec-23-2024, 11:36 PM
Last Post: blakeusherremix68
  [split] Code help emma1423 1 1,111 Dec-13-2024, 02:00 PM
Last Post: perfringo
  Windows Disk Cleanup Code Help Needed nal2us2 3 1,742 Jul-19-2024, 04:03 AM
Last Post: deanhystad
  [split] Explain the python code in this definition Led_Zeppelin 1 1,735 Jan-13-2023, 10:20 PM
Last Post: deanhystad
  Can a program execute code in iPython shell and get result? deanhystad 3 3,515 Jun-17-2022, 03:45 AM
Last Post: Larz60+
  How to Translate a python code written in Mac-OS to Windows? alexanderDennisEnviro500 2 5,102 Jul-31-2021, 08:36 AM
Last Post: Gribouillis
Sad SyntaxError: from simple python example file from mind-monitor code (muse 2) warmcupoftea 4 4,919 Jul-16-2021, 02:51 PM
Last Post: warmcupoftea
  [split] SyntaxError: invalid syntax Code_X 3 4,385 May-04-2021, 05:15 PM
Last Post: Yoriz

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.