dir and help in python

preview_player
Показать описание
In this video you will learn about dir() and help() functions.

dir() and help() methods

dir()
The dir function is used to get all the attributes of an object. It can be used to check all the attribute/function of a module also. It returns a list containing all the attributes of an object.
import methods
print(dir(methods))

help()
The help method prints the documentation of method/class abstract. Consider the following example:
help(print)
The above code prints documentation of print function.
In the above code we imported the methods module, and call the add() and subtract() functions. We also accessed and printed the value of PI from methods module.

#python_by_tarun_sir #tarun_sir #python #tarun_sir_python #python_video_55 #dir()_in_python #python_tutorial #help()_in_python
Рекомендации по теме
Комментарии
Автор

Your voice is so relaxing. And also, you speak slow and clear. 👍👍

gurmindersingh
welcome to shbcf.ru