目标:应该看上去和感觉上都像Python内置的,也就是说,在collections模块中看起来不会太不合适。If the slice's `start` or `stop` is out-of-bounds, it
>>> x = WraparoundList__getitem__(slice(i</em
如何使用iter和next实现滚动/滑动窗口,而不使用slice、itertools、len()等?这就是我到目前为止所拥有的,但显然这不起作用,因为append(next(iterator))。但不允许这样做,也可以像"for i in range(-1,-j-1,-1)“这样的部分让我对发生的事情感到困惑。for step = 1 (skips iterations for step >