摘要: #code:utff-8 import sys from functools import reduce # map #允许接受两个参数,第一个为函数,或者为函数表达式,第二个参数为可迭代对象 # 返回list def test(x): return x * 2 t = [1, 2, 3, 4] for tmp in map(test, t): print(tmp) # filt... 阅读全文
posted @ 2017-12-29 11:17 我是外婆 阅读(94) 评论(0) 推荐(0)
摘要: # code:utf-8 #导入 ABCMeta abstractmethodd from abc import ABCMeta, abstractmethod, abstractproperty class Parent(metaclass=ABCMeta): #2.+ 中以次此种方法 #Python 中没有接口的概念 __metaclass__ = ABCMeta ... 阅读全文
posted @ 2017-12-29 10:16 我是外婆 阅读(235) 评论(0) 推荐(0)