Select Page

ABIOLA RASP – Raspberries for African School Projects

Wie können wir helfen?

< Alle Themen

Python – et & or

no-164 au-04

Logical operators «and» «or»

Using the logical operators you can relate existing truth values to each other, where the result is also a truth value.

  1. Declaration of variable var_1 with 1 and var_2 with 2.
  2. The result is false, because both conditions are equal.

There are as logical operators the «and» and «or». For the definition see below in the notice.

Condition definition of «and» and «or»
Opérateur Condition Result
and True and True
or True and False True