SyntaxFix
Write A Post
Hire A Developer
Questions
You can len(list(generator)) but you could probably make something more efficient if you really intend to discard the results.
len(list(generator))