Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
generator runout
#2
(Oct-31-2019, 01:24 AM)Skaperen Wrote: this can get annoying:
Not sure if there is question here, but generators are exhausted after you iterate over them once.

Also why not use itertools.product to shorten the comprehension?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
generator runout - by Skaperen - Oct-31-2019, 01:24 AM
RE: generator runout - by buran - Oct-31-2019, 07:05 AM
RE: generator runout - by perfringo - Oct-31-2019, 07:09 AM
RE: generator runout - by Skaperen - Oct-31-2019, 08:11 AM
RE: generator runout - by buran - Oct-31-2019, 08:36 AM
RE: generator runout - by Skaperen - Nov-01-2019, 01:01 AM
RE: generator runout - by DeaD_EyE - Oct-31-2019, 09:24 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020