W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_ref_filter.py:
ages = [5, 16, 19, 22, 26, 39, 45] def myFunc(x): if x < 18: return False else: return True adults = filter(myFunc, ages) for x in adults: print(x)