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 3351978
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:58:27+00:00 2026-05-18T01:58:27+00:00

Just like C, you can break a long line into multiple short lines. But

  • 0

Just like C, you can break a long line into multiple short lines. But in Python, if I do this, there will be an indent error… Is it possible?

  • 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-05-18T01:58:27+00:00Added an answer on May 18, 2026 at 1:58 am

    From PEP 8 – Style Guide for Python Code:

    The preferred way of wrapping long lines is by using Python’s implied line
    continuation inside parentheses, brackets and braces. If necessary, you
    can add an extra pair of parentheses around an expression, but sometimes
    using a backslash looks better. Make sure to indent the continued line
    appropriately.

    Example of implicit line continuation:

    a = some_function(
        '1' + '2' + '3' - '4')
    

    On the topic of line breaks around a binary operator, it goes on to say:

    For decades the recommended style was to break after binary operators.
    But this can hurt readability in two ways: the operators tend to get scattered across different columns on the screen, and each operator is moved away from its operand and onto the previous line.

    In Python code, it is permissible to break before or after a binary operator, as long as the convention is consistent locally. For new code Knuth’s style (line breaks before the operator) is suggested.

    Example of explicit line continuation:

    a = '1'   \
        + '2' \
        + '3' \
        - '4'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can call it whatever, but just like there is a convention
How can I print any object into system clipboard just like printfn %A does?
Is there any way can declare a bean in just like JSP UseBean in
I have a large text file but doesn't have any line break. It just
I've spent this morning searching google for this, but I just can't get what
NSString just like 1000.00 and 1008977.72, how can I format them to 1,000.00 and
How can I declare a method with keyword arguments just like rails do. some
I need to create a wall system just like Facebook's (users can post messages,
Can I deploy SQL Server Express with my desktop application just like builtin database?
Can I use that effect on my controls just like the BlurEffect? If it's

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.