我正在研究Python,通过Python工作学习。其中一个练习是模拟Python ()函数,假设传递给该函数的每个迭代都具有相同的长度。以下是我想出的: result = [[] for _ in range(len(args[0]))] for j, w in enumerate(v):
result[j].append
来自Python,我喜欢Coffeescript从Python和Perl中借用的许多特性(范围/切片、理解、解构赋值)。Coffeescript中有没有一些语法糖可以模仿Python的enumerate或zip (itertools.izip)函数?以下是我不太关心的模式:i = 0 ... use x and i ...