摘要:
原文出处:python 获取当前运行的 class 和 方法的名字 # coding=utf-8 import sys class Hello(): def hello(self): print('the name of method is ## {} ##'.format(sys._getfram 阅读全文
摘要:
需求 统计列表a中所有大于5的元素 普通写法 a=[1,3,4,5,6,9] temp=[] for i in a: if i >5: temp.append(i) print(temp) [6, 9] 进阶 lambda写法 filter()是python的内置方法,对序列中的元素进行筛选,最终获 阅读全文