Functions in Python

Home Technical Terms Functions in Python

what is the usage of help() and dir() function in python?

 Help() and dir() both functions are accessible from the Python interpreter and used for viewing a consolidated dump of built-in functions.
 

  1. Help() function: The help() function is used to display the documentation string and also facilitates you to see the help related to modules, keywords, attributes, etc.
  2. Dir() function: The dir() function is used to display the defined symbols.