Operators Flashcards
-
subtract
*
multiply
+
add
**
Exponent - Performs exponential (power) calculation on operators
/
Division
less than
%
Modulus - Divides left hand operand by right hand operand and returns remainder
>
greater than
<=
less than or equal to
> =
greater than or equal to
==
equal to
!=
not equal to
( )
parathesis
//
Floor Division - The division of operands where any digit after decimal point are removed.
9//2 = 4
( )
parenthesis for strings ??
@
?
{ }
parenthesis for ??
[ ]
parenthesis for lists ??
,
separates statements with a space
strings, numbers, booleans, variables etc
=
equals
.
signifies a command/ function/ method
i.e. variable.read var1.append
+=
a = a + ?
;
; is a redundant symbol in Python.
However it is often seen because it is a common syntax of other languages.
It is therefore used by habit by programmers.
It basically does nothing, it does not affect code in anyway.
-=
a = a - ?