Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import importlib
- module = importlib.import_module('math')
- if hasattr(module, '__all__'):
- globals().update({n: getattr(module, n) for n in module.__all__}
- else:
- globals.update({k: v for (k, v) in module.__dict__.items()
- if not k.startswith('_')})
Advertisement
Add Comment
Please, Sign In to add comment