micropython/tests/basics/bytes_gen.py

6 wiersze
114 B
Python
Czysty Zwykły widok Historia

# construct a bytes object from a generator
def gen():
for i in range(4):
yield i
print(bytes(gen()))