getattr with module : Getattr : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Getattr »

 

getattr with module


import math
print math.abs
print getattr(math, "abs")   

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



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Getattr