Python基础学习:结果方法封装——in
# 结果断言 class Result_assertion(object): def result_in(self, value1, value2): result = value1 in value2 if result is True: return '正常' else: return '异常'