Reputation: 2045
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")
Upvotes: 1
Views: 36
Reputation: 437
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")
Upvotes: 4