📜  连续元素差异 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:28.265000             🧑  作者: Mango

代码示例1
>>> t
[1, 3, 6]
>>> [j-i for i, j in zip(t[:-1], t[1:])]  # or use itertools.izip in py2k
[2, 3]