PYTHON CODING
- waclaw_koscielniak

- Jul 17, 2025
- 1 min read
Updated: Jul 18, 2025
def chooser(val):
if val == "a":
yield from [1, 2]
else:
yield from [3, 4]
print(list(chooser("b")))
[Running] python3 -u "/Users/name/test/test42.py"
[3, 4]
[Done] exited with code=0 in 0.05 seconds


Did you try to run it?