Object tips in python.
Goal: Learn some python tricks for objects.
- “_” represents last object returned.
- Python objects are always instance of something, to check the class type:
print object.__class__
- Quering object type:
if isinstanceof(a,(int,float,str,list,tuple))
- Most objects/functions are self documented, get help by typeing:
print obj.__doc__