• Listing 6. The range and xrange methods.

    清单6.rangexrange方法

    youdao

  • For example, you can set the xrange also: plot [-pi: PI] sin (x).

    例如,还可以设置xrangeplot [-pipi]sin (x)。

    youdao

  • This same concern got xrange() and xreadlines() added to Python in earlier versions.

    同样这个问题使得 Python较早的版本中添加xrange()xreadlines() 。

    youdao

  • The Python for loop can mimic this behavior by using the built-in range and xrange methods.

    Pythonfor循环可以通过使用内置rangexrange方法来模拟行为

    youdao

  • As always, [" 31-may-04 ":" 11-jun-04 "] sets up the xrange explicitly, but is not strictly necessary.

    象往常一样,[“ 31 - May -04 ”: “ 11 - Jun - 04 ”]显式设置xrange不是完全必要的。

    youdao

  • Setting the y-range is similar (use yrange instead of xrange in the command), but I don't talk about it.

    设置y 范围与 x 范围相似命令使用yrange而不是xrange ),不再讨论。

    youdao

  • The xrange method behaves much like the range method in that it creates a list of integers (and takes the same arguments).

    由于 xrange方法创建整数 list使用相同参数),所以 range 方法非常相似

    youdao

  • For example, in Listing 6, attempting to print out the newly created xrange didn't show anything other than the name of the xrange.

    例如清单6中,尝试打印出新创建xrange时除了xrange名称不会显示任何数据。

    youdao

  • Functions like xrange are a bit "special" in being generator-like, but neither quite a real iterator (no.next method), nor a realized list like range returns.

    xrange这样函数与生成器类似的方面有些“特殊”,它们既不是真正的迭代器(没有.next方法),也不是实际的列表(比如range返回的列表)。

    youdao

  • The xrange method is preferred when you need to iterate over a large number of integers because it won't create the full list, which could consume a large quantity of your computer's memory.

    需要迭代大量整数时,xrange方法更适用,因为不会创建极大list,那样消耗大量计算机内存

    youdao

  • The xrange method is preferred when you need to iterate over a large number of integers because it won't create the full list, which could consume a large quantity of your computer's memory.

    需要迭代大量整数时,xrange方法更适用,因为不会创建极大list,那样消耗大量计算机内存

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定