Python Forum
whats the difference between sys.exit() and break?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
whats the difference between sys.exit() and break?
#1
it a question from at total beginner, so its probably stupid, but bear with me.
Reply
#2
The break statement exits a loop. The sys.exit function exits Python altogether.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python difference between sys.exit and exit() mg24 1 1,816 Nov-12-2022, 01:37 PM
Last Post: deanhystad
  Whats wrong with the elif? inunanimous93 3 2,435 Nov-30-2020, 03:58 AM
Last Post: deanhystad
  Whats Wrong!? rjay81 3 2,248 May-13-2020, 08:02 PM
Last Post: rjay81
  Can u see this code and tell whats wrong with it? AhmadKamal 14 5,284 Apr-29-2020, 11:09 AM
Last Post: jefsummers
  Whats a good design/approach? hshivaraj 1 1,761 Sep-16-2019, 01:44 AM
Last Post: snippsat
  elevator simulator...whats the wrong at this code? tasos710 5 5,891 Jun-11-2019, 01:38 AM
Last Post: micseydel
  Whats wrong with this code? student1 1 2,395 May-18-2018, 04:19 PM
Last Post: skorpius_
  Using break to exit a loop help JJG 4 4,175 Dec-09-2017, 03:02 AM
Last Post: JJG
  I have no clue whats wrong... Jack_03 1 2,809 Sep-28-2017, 05:36 PM
Last Post: nilamo
  Whats wrong with line 12? brimalm 2 3,174 Sep-11-2017, 12:23 PM
Last Post: brimalm

Forum Jump:

User Panel Messages

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