Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding "while True"
#2
while True means "while bool(True) == True`, which will always be the case - it's an infinite loop.
The loop would continue on forever, if not for the break statement which exits it.
Reply


Messages In This Thread
Understanding "while True" - by RedSkeleton007 - Mar-09-2018, 09:58 AM
RE: Understanding "while True" - by stranac - Mar-09-2018, 10:26 AM
RE: Understanding "while True" - by snippsat - Mar-09-2018, 12:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Returning True or False vs. True or None trevorkavanaugh 6 9,707 Apr-04-2019, 08:42 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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