Python Forum
Getting an unexpected generator object ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting an unexpected generator object ?
#2
line 24 - using () brackets makes it generator expression
use square brackets and it will be list comprehension (i.e. if you want to see the numbers when print)
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
RE: Getting an unexpected generator object ? - by buran - Mar-27-2019, 01:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating list of lists from generator object t4keheart 1 2,227 Nov-13-2020, 04:59 AM
Last Post: perfringo
  unexpected object? urufu 2 2,039 Mar-08-2020, 02:35 PM
Last Post: urufu
  receive from a generator, send to a generator Skaperen 9 5,552 Feb-05-2018, 06:26 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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