邏輯運算子

  1. 邏輯(logical)運算子,主要用在組合判斷狀況。
    pyuser@deyu ~/zzz$ python
    Type "help", "copyright", "credits" or "license" for more information.
    >>> x=7
    >>> x<10 and x>5
    True
    >>> x<5 or x>10
    False
    >>> not(x<5 or x>10)
    True
    >>> quit()