clubs:python_club:python_club_operators
Home | clubs :: cloud club :: python_club :: 3D-Printing | projects :: Proxmox | Kubernetes | scripting | utilities | games
Table of Contents
Python Club Topics - Operators
Operators
- Operators perform operators on variables
Addition Operator
- Add numbers, strings, or list items together
a = ["apple"] b = ["banana"] print (a+b)
List of operators
- Addition ( eg. + )
- Subtraction ( eg. - )
- Multiplication ( eg. * )
- Modulus ( eg. % )
Assignment operators
- The following are the same expression
x = 9 x += 3 x = x + 3 print(x)
- The following are the same expression
x = 33 x -= 3 x = x - 3 print(x)
Comparison operators
- Equal to ( eg. == )
x = 3 y = 5 print(x == y)
- Grater than or equal to ( eg. >= )
x = 3 y = 5 print(x >= y)
- Less than or equal to ( eg. ⇐ )
x = 3 y = 5 print(x <= y)
clubs/python_club/python_club_operators.txt · Last modified: by 127.0.0.1
