-4 python networking cluster-analysis
I just want to do the community detection using Girvan Newman Algorithm, and the code was learned from a youtube video. However, when I run the same code, there comes an error
I have tried on Mac OS X python 2.7 terminal and python 3.7 by Jupyter both and the error are the same.

I expect the output to have two communities lists
You can convert to a list first to get the len:
l = len(list(c))
Run Code Online (Sandbox Code Playgroud)