Week 6 - Mutation
Tips And Tricks For Working With Types
-
The builtin function
typegives you the type of an object:>>> type(1) <class 'int'> -
The builtin function
isinstancereturns whether your object is of some type:>>> isinstance(1, bool) False