Skip to content

Instantly share code, notes, and snippets.

@mhtocs
Created April 19, 2020 14:41
Show Gist options
  • Save mhtocs/97716eab7c0fa4c4425c182115dfc938 to your computer and use it in GitHub Desktop.
Save mhtocs/97716eab7c0fa4c4425c182115dfc938 to your computer and use it in GitHub Desktop.
To list all callables
import math
list_callables = lambda module : [ v.__name__ for k,v in module.__dict__.items() if callable(v)]
all_math_function = list_callables(math) #list_callables accepts a module name, the module (here math) must be imported already
print(all_math_function)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment