Help() and dir()

What is the usage of help() and dir() function in Python? example please ...

Last updated:6/19/2018 1:50:40 AM

1 Answers

Prakash nidhi Verma
Prakash nidhi Verma

Help() function:  

it's used to display the documentation string and also help in modules, keywords, attributes, and you use a return as a method,attributes. 

Example :

my_list = [] 

dir() function:  

The dir() function is used to display the defined symbols and as a arguments for currents local namespace for a local keys. 

Ex :

my_list = []