[Solved] How can I pass a variable from one generator to another in Python?


I am not completly sure if this is what you are looking for, but generators have a method called ‘send’ which enables you to pass data to the generator.
You might want to read this example. Pay attention to the functions ‘consume’ and ‘produce’.

solved How can I pass a variable from one generator to another in Python?