kopia lustrzana https://github.com/micropython/micropython
6 wiersze
114 B
Python
6 wiersze
114 B
Python
|
# construct a bytes object from a generator
|
||
|
def gen():
|
||
|
for i in range(4):
|
||
|
yield i
|
||
|
print(bytes(gen()))
|