Select Page

ABIOLA RASP – Raspberries for African School Projects

Wie können wir helfen?

< Alle Themen
Print

Python – and & or

no-164 au-04

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“
Operator ->  Condition -> Result
and -> True and True  -> True
or -> True and False -> True

Inhaltsverzeichnis