mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 20:10:17 +00:00
13 lines
275 B
Python
13 lines
275 B
Python
class chain:
|
|
def __init__(self, *iterable):
|
|
self.iterable = iterable
|
|
|
|
@classmethod
|
|
def from_iterable(cls, iterable):
|
|
for it in iterable:
|
|
yield from it
|
|
|
|
def __iter__(self):
|
|
for it in self.iterable:
|
|
yield from it
|