首页 > 代码库 > Python学习笔记——迭代器(RandSeq和AnyIter)

Python学习笔记——迭代器(RandSeq和AnyIter)

1.RandSeq

#coding:utf-8#!/usr/bin/env python‘randSeq.py -- 迭代‘#从random模块里仅仅导入choice方法from random import choice	class RandSeq(object):	def __init__(self,seq):		self.data = http://www.mamicode.com/seq;>

 

Python学习笔记——迭代器(RandSeq和AnyIter)