import math print math.abs print getattr(math, "abs") object = math method = "abs" print getattr(object, method) print type(getattr(object, method))