Python Forum
testing if an iterator is empty
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
testing if an iterator is empty
#1
is there a way to test if an iterator is empty without "consuming" any content in case it is not empty? does a true/false test accomplish this? i don't want to iterate them to a list because some may be too large or infinite.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
testing if an iterator is empty - by Skaperen - Feb-23-2022, 12:23 AM
RE: testing if an iterator is empty - by BashBedlam - Feb-23-2022, 12:59 AM
RE: testing if an iterator is empty - by Skaperen - Feb-24-2022, 08:20 PM
RE: testing if an iterator is empty - by Skaperen - Feb-24-2022, 08:23 PM
RE: testing if an iterator is empty - by BashBedlam - Feb-24-2022, 09:21 PM
RE: testing if an iterator is empty - by Skaperen - Feb-24-2022, 10:35 PM
RE: testing if an iterator is empty - by BashBedlam - Feb-24-2022, 10:40 PM
RE: testing if an iterator is empty - by Skaperen - Feb-25-2022, 02:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  multiplying an iterator Skaperen 9 3,468 Oct-12-2021, 07:07 PM
Last Post: Skaperen
  iterating an iterator by one step Skaperen 0 1,637 Feb-09-2021, 08:38 PM
Last Post: Skaperen
  modifying the origin of an iterator Skaperen 4 3,064 Mar-05-2020, 11:49 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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