摘要: 我们都知道 ,python可以通过 eval和exec等执行简单或者复杂的字符串类型的python语句.但是这种方式对于类方法会失效. 还有两种其他方式可以 例如: class A(): def add(self, x, y): c = x + y print('{}+{}={}'.format(x 阅读全文
posted @ 2020-09-24 14:56 素老奸 阅读(1343) 评论(0) 推荐(0) 编辑