0

How do I get to know the functions that are already defined in a predefined module?

4th Aug 2020, 9:50 PM
shreya das
shreya das - avatar
2 Antworten
+ 2
For built-in modules follow ~ swim ~ 's answer. If the module is not built-in and you are afraid about overriding a function in the module, use 'import <module_name>' instead of 'from <module_name> import <func>'. So if a module 'x' has function 'y' and your code also has a function 'y', you can access the module's function by x.y() and your code's function by y().
4th Aug 2020, 10:33 PM
XXX
XXX - avatar
0
you could also try dir(module_name) to get the functions then help(function_name)
4th Aug 2020, 11:25 PM
madeline
madeline - avatar