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
I want to know what all standard exceptions are there in python. Where can I find a list of standard python exceptions?
I can know if a variable is defined or not using exception handling as follows. I want to find if a variable in a python code exists or not without using try-except block.
I am new to Python programming and I am learning exception handling. Is there any command or code snippet in python to print the Exception/Error Class hierarchy?  The output should on the lines of the following: https://docs.python.org/2/library/exceptions.html#exception-hierarchy
I have written a C extension and I want to raise a python exception from this code. Any help in this matter is appreciated.
I want to test the following code both with and without using assert statement How can I raise AssertionError for the same code?
In the following code I am able to pass an argument list to a python function both implicitly and explicitly and call it. How was this made possible? 
If I use the following code I am able to pass keyword parameters to a python function. How is this possible?
When I am using the following code I am able to use variable-length arguments in a python function? How is it possible?
I have this code When I run the code, I expect the following output [12] [43] But the actual output is  [12] [12, 43] Why is it that I am getting the output as shown? ssues
I have this code where I have explicitly defined the datatype In Python, variables are never explicitly typed. If we explicitly define datatype in a python function as in above code, does it affect the outcome?
Let's say I have a module fibo, and it has a function whose name contains a string “baz”. How do I call this function?.
I have a list given below as follows [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] How do I return this list or any given list from a python function?
loader
Contribution

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