and, or, not (Python)
Në shqip: Operatorët logjikë në Python
ShpjegimiSQ
Python-i përdor fjalë në vend të simboleve: and (të dyja), or (njëra prej tyre) dhe not (e kundërta). Lexohen si anglisht e thjeshtë: if mosha >= 18 and ka_leje:.
EnglishEN
Python uses words instead of symbols: and (both), or (either) and not (the opposite). They read like plain English: if age >= 18 and has_licence:.
Si ta mendosh
Si rregullat e hyrjes në klub: „mbi 18 dhe me biletë“.
Lexoje në anglisht
Like club entry rules: “over 18 and with a ticket”.
Shembull kodipython
mosha, bileta = 19, True
if mosha >= 18 and bileta:
print("Mund të hysh")
print(not bileta) # False