Python Forum
A context to exit deeply nested loops
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A context to exit deeply nested loops
#3
Yoriz Wrote:if the nested loop is in a function, return can be used instead of break to exit.
Yes, but in this case, session.exit() exits more than the function. It exits from a block of code that contained the call to the function.
Reply


Messages In This Thread
RE: A context to exit deeply nested loops - by Gribouillis - May-10-2019, 01:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Deeply nested JSON editing tool w/set arithmetic epieye 0 2,846 Sep-13-2021, 06:04 PM
Last Post: epieye

Forum Jump:

User Panel Messages

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