Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8171351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:26:08+00:00 2026-06-06T21:26:08+00:00

I cannot see a significant difference between the two following lines. Yet the first

  • 0

I cannot see a significant difference between the two following lines.

Yet the first parses, and the latter, does not.

In [5]: n=""" \\"Axis of Awesome\\" """

In [6]: n="""\\"Axis of Awesome\\""""
  File "<ipython-input-6-d691e511a27b>", line 1
    n="""\\"Axis of Awesome\\""""
                                ^
SyntaxError: EOL while scanning string literal

Is this a Python bug/feature/oddity, or have I missing something fundamental?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:26:10+00:00Added an answer on June 6, 2026 at 9:26 pm

    The last four quote marks in

    """\\"Axis of Awesome\\""""
    

    are parsed as """, i.e. end of string, followed by ", i.e. start of a new string literal. This new literal is never completed, though. Simple example:

    >>> """foo""""bar"
    'foobar'
    >>> """foo""" "bar"
    'foobar'
    

    If you want to avoid this problem, then replace """ with r' or escape the ":

    >>> """\\"Axis of Awesome\\\""""
    '\\"Axis of Awesome\\"'
    >>> r'\"Axis of Awesome\"'
    '\\"Axis of Awesome\\"'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot see what is wrong here but the image does not display using
I cannot see an index.html in my site root. http://localhost/index.html does not work. Also
i cannot see the different between using atmosphere api or use grizzly directly? can
Sometimes appears this arrow so I cannot see if breakpoint is installed. Does it
I do not usually use JavaScript, and cannot see why this is not working.
What's wrong with the following code? I cannot see the reason for the error
I see that tax information is kept at order level but I cannot see
In a new project of mine I cannot see the Deployment Assembly link in
There is one client who cannot see the img title tags in IE8. Is
I know that a 32-bit OS cannot see more than 4 GB of RAM.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.