You can use dir to check if a name is in a module:
>>> import os
>>> "walk" in dir(os)
True
>>>
In the sample code above, we test for the os.walk function.
You can use dir to check if a name is in a module:
>>> import os
>>> "walk" in dir(os)
True
>>>
In the sample code above, we test for the os.walk function.