What is the main meaning for (from sys import exit) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the main meaning for (from sys import exit)

What is the main meaning for (from sys import exit)

9th Mar 2017, 9:55 AM
hmangaiha Pachuau
hmangaiha Pachuau - avatar
5 Answers
0
it means from module sys, take function exit. it is like , from math import sqrt
9th Mar 2017, 12:36 PM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
oh.. i see.. so, what does this exit have to deal with the program? btw thnk u so much for the reply
10th Mar 2017, 8:58 AM
hmangaiha Pachuau
hmangaiha Pachuau - avatar
0
like if you have infinity loop and you want to come out of the loop based on any condition, then exit function will be used and exit () is defined in sys module
10th Mar 2017, 9:45 AM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
ok... now i get it... once again thanks to you
10th Mar 2017, 9:47 AM
hmangaiha Pachuau
hmangaiha Pachuau - avatar
0
its ok man..cheers..enjoy python
10th Mar 2017, 9:52 AM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar