有一個簡單的例子,實際上陳述句太長,一行寫不出來,我必須在每一行寫一些必要的注釋,但是當我添加\and時#,這里顯示錯誤,如何解決這個問題?
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")
uj5u.com熱心網友回復:
把這個放在括號里。
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")
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/465640.html
標籤:Python python-3.x
