Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I am aware of the die() command in PHP which stops a script early.

How can I do this in Python?

1 Answer

0 votes
by (106k points)

You can use the below-mentioned code to terminate a Python script:-

import sys 

sys.exit()

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 3, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...