Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint
Drag to reposition
Server Side Programming Questions
In the code below if I enter any two integers at prompt, I get the following output What type of error am I getting? Is it runtime error?
I can raise multiple exceptions like this And like this  How do I catch multiple exceptions in one except block?
I have come across this idea that exceptions should not hold strings, as strings can themselves throw exceptions. How far is this idea true?
How do I check if ‘ello’ is contained in the string ‘hello world’? How do I also check if ‘no’ is contained in the string ‘Harry Potter: The Goblet of Fire’?
When I run the following line of code, I get an error. How do I catch this error and what type of error is it?
I have a code and I want to test it and debug it. Is there any built-in function or statement in python to test code without using exception handling?
When I am running the following code, I am getting an error. OUTPUT How to use try, except and finally statements in python to handle exceptions like above?
When I type say 3/0 at python prompt, I get an error as follows. OUTPUT How to handle errors/exceptions in python?
When I run the following code, I am getting an error as follows. OUTPUT How to address this problem?
There are two similar codes as follows. and: I would like to know if there is any change in functionality with the change in syntax.
When you just want to do run a try-except block without handling the exception; how do you do it in Python?
I have a code using 'for loop' that throws an exception.  How do I catch this exception in the loop in above code?
I have a list comprehension in Python in which an iteration can throw an exception. For instance, if I have: I'll get an exception while iterating over element ‘0’ of the tuple. How can I handle this exception and continue execution of the list comprehension?
loader
Contribution

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.