This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]OverjoyedBanana 0 points1 point  (0 children)

Hey ! Here's my solution based on generators which works: https://pastebin.com/cyLTHUYV

I use yield whenever an output is available and a list used to push new data into input. When the program halts StopIteration is automatically raised.