Python 3.8.3 (default, May 17 2020, 18:15:42)
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from itertools import count, chain, islice
>>> t = chain.from_iterable(zip(count(1, 4), count(-3, -4)))
>>> list(islice(t, 4))
[1, -3, 5, -7]
--
修改:ilovecpp FROM 114.86.92.*
FROM 114.86.92.*