Question: what is the difference between dir and help in python?
Answer: The dir function returns a list of all the attributes within in an object - these could be either data values or methods, and the list includes private and magic methods. The help function works by formatting all of the docstrings from the object with other data into a hopefully useful help page.