鱼C论坛

 找回密码
 立即注册
查看: 2997|回复: 2

请问

[复制链接]
发表于 2018-8-13 15:52:06 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
    >>> tuple1 = (x**2 for x in range(10))
    >>> tuple1.__next__()
    0
    >>> tuple1.__next__()
    1
    >>> tuple1.__next__()
    4
    >>> tuple1.__next__()
    9
    >>> tuple1.__next__()
    16
    >>> tuple1.__next__()
    25
    >>> tuple1.__next__()
    36
我自己拿idle怎么运行不出来呢
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2018-8-13 16:15:39 | 显示全部楼层
怎么不出来法?我这里一切正常
  1. >>> tuple1 = (x**2 for x in range(10))
  2. >>> tuple1.__next__()
  3. 0
  4. >>> tuple1.__next__()
  5. 1
  6. >>> tuple1.__next__()
  7. 4
  8. >>> tuple1.__next__()
  9. 9
  10. >>> tuple1.__next__()
  11. 16
  12. >>> tuple1.__next__()
  13. 25
  14. >>> tuple1.__next__()
  15. 36
  16. >>> tuple1.__next__()
  17. 49
  18. >>> tuple1.__next__()
  19. 64
  20. >>> tuple1.__next__()
  21. 81
  22. >>>
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2018-8-13 19:12:44 | 显示全部楼层
手动输一遍试试
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-22 00:51

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表