中国高校课件下载中心 》 教学资源 》 大学文库

南京大学:《计算机程序的构造和解释 Structure and Interpretation of Computer Programs》课程教学资源(PPT课件讲稿)13-Iterators

文档信息
资源类别:文库
文档格式:PDF
文档页数:70
文件大小:176.73KB
团购合买:点击进入团购
内容简介
南京大学:《计算机程序的构造和解释 Structure and Interpretation of Computer Programs》课程教学资源(PPT课件讲稿)13-Iterators
刷新页面文档预览

Iterators

Iterators

Announcements

Announcements

Iterators

Iterators

Iterators m

Iterators 4

Iterators A container can provide an iterator that provides access to its elements in order n

Iterators 4 A container can provide an iterator that provides access to its elements in order

Iterators A container can provide an iterator that provides access to its elements in order iter(iterable):Return an iterator over the elements of an iterable value next(iterator):Return the next element in an iterator n

Iterators 4 A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements of an iterable value Return the next element in an iterator

Iterators A container can provide an iterator that provides access to its elements in order iter(iterable):Return an iterator over the elements of an iterable value >>5=[3,4,5] next(iterator):Return the next element in an iterator n

Iterators 4 A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements of an iterable value Return the next element in an iterator >>> s = [3, 4, 5]

Iterators A container can provide an iterator that provides access to its elements in order iter(iterable):Return an iterator over the elements of an iterable value >>5=[3,4,5] >>t iter(s) next(iterator):Return the next element in an iterator n

Iterators 4 A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements of an iterable value Return the next element in an iterator >>> s = [3, 4, 5] >>> t = iter(s)

Iterators A container can provide an iterator that provides access to its elements in order iter(iterable):Return an iterator over the elements of an iterable value V >>5=[3,4,5] >>t iter(s) next(iterator):Return the next element in an iterator n

Iterators 4 A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements of an iterable value Return the next element in an iterator >>> s = [3, 4, 5] >>> t = iter(s)

Iterators A container can provide an iterator that provides access to its elements in order iter(iterable):Return an iterator over the elements of an iterable value V >>5=[3,4,5] >>t iter(s) next(iterator):Return the next element in an iterator >>next(t) 3 n

Iterators 4 A container can provide an iterator that provides access to its elements in order iter(iterable): next(iterator): Return an iterator over the elements of an iterable value Return the next element in an iterator >>> s = [3, 4, 5] >>> t = iter(s) >>> next(t) 3

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档