# -*- coding: UTF-8 -*- #模块 #反射模块中的属性 import my print(my.day) print(getattr(my,'day')) #反射模块中的方法 if hasattr(my,'wahaha'): getattr(my,'wahaha')()