摘要:
1.生成器>>> def func1():... yield 0... yield 1... >>> a=func1()>>> a.next()0>>> a.next()1>>> a.next()Traceback (most recent call last): File "",... 阅读全文
摘要:
int_ip = lambda x: '.'.join([str(x/(256**i)%256) for i in range(3,-1,-1)])ip_int = lambda x:sum([256**j*int(i) for j,i in enumerate(x.split('.')[::-1]... 阅读全文