[python] How to len(generator())