在教學中寫到: def spam(s): for attr in ['isnumeric', 'isdecimal', 'isdigit']: print(attr, getattr(s, attr)()). 而菜鳥教程寫到,getattr用法 ...
確定! 回上一頁