Operations | Result |
---|---|
+ | add the variables |
- | subtract the variables |
* | multiply the variables |
/ | divide the variables |
# | comment the line |
== | compare the variables |
< > | compare the variables |
Column A | Column B |
---|---|
List | List can be represented by [ ] |
Tuple | Tuple can be represented by () |
Dictionary | Dictionary can be represented by {} |
Set | Set can be represented by {} |
Column A Column B Text Type str Numeric Types int, float, complex Sequence Types list, tuple, rangeM apping Type dict Set Types set, frozenset Boolean Type bool Binary Types bytes, bytearray,memoryview None Type NoneType
There are three numeric types in Python
Int = Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length
Float, or "floating point number" is a number, positive or negative, containing one or more decimals.
Complex numbers are written with a "j" as the imaginary part