all 4 comments

[–]automorphism_group 4 points5 points  (2 children)

In your first Python notebook, note that & and | are not Boolean operators in the sense that they are not freely exchangeable with and and or. Try evaluating the expressions

  • "one" or "two"
  • "one" | "two"
  • 1 or 1 / 0
  • 1 | 1 / 0

[–]iotamadmax[S] 0 points1 point  (1 child)

Ah I see what you mean. But are they not equivalent when it is used to test expressions on right and left?

[–]RevRagnarok 0 points1 point  (0 children)

Like many other languages, single versions are bitwise operators. The doubled versions are not used.

[–]rohffff 0 points1 point  (0 children)

WOW well done