Search notes:

Python operators

Comparison operators: ==, !=, <>, >, <, >=, <=
Assignment operators: =, +=, -=, *=, /=, %=, **=, //=
Bitwise operators: &, |, ^, ~\
Logical operators: and, or and not
Membership operators: in and not in.
Identity operators is and is not.
// is the floor division operator: 42 // 10 as well as 49 // 10 evaluate to 4.

is

is compares the identity of two objects.

Ternary operator

The equivalent of the ternary operator expr ? expr_if_true : expr_if_false, as found in C related languages in Python is:
expr_if_true if expr else expr_if_false

comma

The comma (,) is not operator in Python, but a separator between expressions.

See also

Python allows to overload operators
The standard library operator

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758192484, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/operators/index(73): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78