Difference between dir() and help()
In Python, help() is a super useful built-in function that can be used to return the Python documentation of a particular object, method, attributes, etc.
In python, dir() shows a list of attributes for the object passed in as argument , without an argument it returns the list of names in the current local namespace (similar to locals().keys() ) .
There is no hard rules as to what they will give, consequently they may change from version to version. Any differences are unlikely to be deliberate, but merely side-effects of the specific implementation of each.