This is a draft cheat sheet. It is a work in progress and is not finished yet.
Data Types
Integer |
-567, 175 |
Float |
-46.21, 7.9e-10 |
String |
"Hello", 'Bye', '''Smile''' |
Boolean |
True, False |
List |
[value, value, ...] or [] |
Tuple |
(value, value, ...) or () |
Dictionary |
{key : value, ...} or {} |
Set |
{value, value, ...} or set() |
Arithmetic Operators
x + y |
add |
x % y |
modulus |
x - y |
substract |
x // y |
remainder |
x * y |
multiply |
x ** y |
square |
x / y |
divide |
x op= y |
eg: x+=1 |
Arithmetic Comparisons
x < y |
Less |
x <= y |
Less or Eq |
x > y |
Greater |
x >= y |
Greater or Eq |
x == y |
Equal |
x != y |
Not Equal |
|
|
|
|
|