Styling
assert
We use assert
to make codes robust.
assert condition, 'message'
usage
-
assert value of a variable
check if the variable is in the correct interval.
-
assert type of a variable
assert isinstance(input, list), 'input must be type of list'