OpenSesame
Rapunzel Code Editor
DataMatrix
Support forum
Python Tutorials
MindProbe
Supported by

类似 Python 的迭代器 (Pythonic)

pythonic库提供了类似Python的函数,用于遍历数组。可用的函数有:range()enumerate()items()zip()zipLongest()

示例:

绘制一个五行五列的递增数字网格:

let positions = xy_grid(5, 50)
const cnv = Canvas()
for (const [i, [x, y]] of enumerate(positions)) {
    cnv.text({text: i, x: x, y: y})
}
cnv.show()

概述请参见:

Supported by