Dive Into Python 学习记录3-getattr 介绍/过滤列表/and or/lambda 函数
3.1getattr介绍>>>li=["Larry","Curly"]
>>>li.pop
>>>getattr(li,"pop")
>>>getattr(li,'pop')(3)
'why'
>>>li
['hard','difficult','complex']#也可以用
>>>getattr(li,"append")("Moe")
>>>li
["Larry","Curly","Moe