Python的邏輯運算中,and/or的優先順序依舊是先計算and之後再算or。

print(0 or 3 and 8 or 1 and 10)

文章標籤

玄霄 發表在 痞客邦 留言(0) 人氣()