簡單 Python 快樂之旅之:Python 基礎語法之邏輯運算關鍵字的使用例子

Python 裏用於邏輯運算的關鍵字有 and、or 和 not。 Python 中的與操作可以使用 and 關鍵字。以下是在兩個布爾值之間進行 and 操作的例子: # Python logical and operator # True and True a = True b = True c = a and b print(a, 'and', b, 'is:', c) # True and
相關文章
相關標籤/搜索