'Using getattr() to access built-in functions

I would like to use getattr() to access Python's built-in functions. Is that possible?

For example:

getattr(???, 'abs')

I know I can just simply do:

>>> abs
<built-in function abs>

But I want to use getattr, because the keyword names are strings.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source