1  Primitive Types

type(42)
#> <class 'int'>
type(4.2) 
#> <class 'float'>
type(4.)
#> <class 'float'>
type('forty-two')      
#> <class 'str'>
type(True)             
#> <class 'bool'>

1.0.1 Type Conversion

int(2.8)
#> 2
float(1)
#> 1.0
str(3)
#> '3'
bool(0)
#> False

These considered “Falsy”

""
0
None
bool(0)
#> False
bool(1)
#> True

bool("")
#> False
bool("F")
#> True

bool(None)
#> False

1.0.2 Attribute

a = "foo"
a.capitalize()
#> 'Foo'