I'm a beginner! I'm trying to code a for-while loop using Twint to scrape Twitter, starting from a list or a dict of usernames and ending up with a (NetworkX) directed graph of transitively associated nodes and edges. I want to set a variable number of transitive steps until transitive closure. 'Directed' will refer to whether the follower/followed relationship is one way or both ways.
I've tried and I've got a For loop which outputs edges, and a While loop which outputs additional transitively associated nodes into a list, but the While loop doesn't output edges yet.
Please can someone point me to a relevant example of how to do this or part of it?
Thanks!