Concept Flow - type() and isinstance()
Start with a variable
Use type() to get exact type
Use isinstance() to check if variable is a type or subclass
If True
→Do something
If False
→Do something else
End
First, get the variable's exact type with type(). Then, check if it matches or inherits a type using isinstance(). Based on that, decide what to do.