If I have a module Test
and if I need to list all the functions in them, I do this:
import Test
dir(Test)
Unless I import the module I won't be able to use the functions defined in them.
But all the functions in __builtin__
module can be used without importing. But without import __builtin__
I am not able to do a dir(__builtin__)
. Does that mean we use the functions without importing the entire module?
from __builtin__ import zip
Is it something like the above? But if I do del zip
, I get
NameError: name 'zip' is not defined
Can anyone please explain this behavior?