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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:07:45+00:00 2026-06-17T12:07:45+00:00

In C++, I like to break up my lines of code if they get

  • 0

In C++, I like to break up my lines of code if they get too long, or if an if statement if there are a lot of checks in it.

if (x == 10 && y < 20 && name == "hi" && obj1 != null) 
    // Do things 

// vs

if (x == 10
    && y < 20
    && name == "hi"
    && obj1 != null)
{
    // Do things
}

AddAndSpawnParticleSystem(inParticleEffectName, inEffectIDHash, overrideParticleSystems, mAppliedEffects[inEffectIDHash], inTagNameHash);
// vs
AddAndSpawnParticleSystem(inParticleEffectName, inEffectIDHash, overrideParticleSystems, 
    mAppliedEffects[inEffectIDHash], inTagNameHash);

In Python, code blocks are defined by the tabs, not by the “;” at the end of the line

if number > 5 and number < 15:
    print "1"

Is mutliple lines possible in python? like…

if number > 5 
and number < 15:
    print "1"

I don’t think this is possible, but it would be cool!

  • 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-17T12:07:47+00:00Added an answer on June 17, 2026 at 12:07 pm

    Style guide (PEP-8) says:

    The preferred way of wrapping long lines is by using Python’s implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation. Make sure to indent the continued line appropriately. The preferred place to break around a binary operator is after the operator, not before it.

    Method 1: Using parenthesis

    if (number > 5 and
            number < 15):
        print "1"
    

    Method 2: Using backslash

    if number > 5 and \
    number < 15:
        print "1"
    

    Method 3: Using backslash + indent for better readability

    if number > 5 and \
            number < 15:
        print "1"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I break the code of the for loop without using break like I have
Is there something like die in JavaScript? I've tried with break, but doesn't work
is there a way to 'break' out of a groovy closure. maybe something like
I have code that looks like this: function processRequest() { // get the verb
I would like to add a line break <br/> at the half of each
My file has a lot of line breaks, like this: This is a line.
I'd like to break out of the currently running program and be dropped back
original column is like: 0.45::rafas::4.0::0.0::0.9 0.35::rasaf::4.0::110.0::1.0 and i would like to break the string
I need to break apart a string that always looks like this: something --
I'm writing some code with a simple switch statement based on Enum values. It

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.