Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to write comment behind text in one line if this sentence is divided into many lines?

There is a simple example, actually statement is too long to write in one line, and I have to write some necessary comment in each line, but when I add \ and #, it shows error here, how to solve this problem?

   a, b, c = 1,2,3 
    if a > 10 \ #add element a
    or b > 10 \ #add element b
    or c > 10: #add element b
        print("good")

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Just put this in bracket.

a, b, c = 1,2,3
if (a > 10 #add element a
or b > 10  #add element b
or c > 10): #add element c
    print("good")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading