Skip to content

Commit ea49420

Browse files
author
Pavlo Stadnikov
committed
add logical operators
1 parent 411980a commit ea49420

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sheet.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ abs(a) # absolute value
149149
2 < 1 # smaller
150150
1 != 2 # not equal
151151
1 != 2 and 2 < 3 # logical AND
152+
a & b # logical AND
152153
1 != 2 or 2 < 3 # logical OR
154+
a | b # logical OR
153155
not 1 == 2 # logical NOT
156+
a ^ b # logical XOR
154157
'a' in b # test if a is in b
155158
a is b # test if objects point to the same memory (id)
156159
```

0 commit comments

Comments
 (0)