
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sarika Singh has Published 189 Articles

Sarika Singh
360 Views
While passing arguments to a Python function, if the datatype of the given values is different from the function parameters, a TypeError is raised. But if the type of the argument is accurate and its value is inappropriate, a ValueError exception is raised In this article, you will learn how to catch ... Read More

Sarika Singh
581 Views
ZeroDivisionError Exception in Python The ZeroDivisionError is raised in Python when a number is divided by zero. Since dividing by zero is mathematically undefined, Python throws this error. In this article, you will learn how to catch and handle ZeroDivisionError using the try-except block. Usually, when an exception occurs, the ... Read More

Sarika Singh
519 Views
StandardError in Python 2In Python 2, StandardError was a built-in exception class that is a base class for all built-in exceptions except for SystemExit, KeyboardInterrupt, and GeneratorExit. Using this class, we were able to catch the most common runtime errors in a single except block. However, since Python 3, the StandardError ... Read More

Sarika Singh
1K+ Views
StopIteration Exception in Python The StopIteration exception in Python is raised to indicate that there are no more items left in an iterator to retrieve. It occurs when a call to the next() or, __next__() reaches the end of an iterable. In this article, you will learn how and when StopIteration ... Read More

Sarika Singh
894 Views
Python threads do not automatically pass exceptions to the caller thread. To catch thread exceptions in the main thread, you can use custom thread classes, the ThreadPoolExecutor with futures, or a shared queue. Using a Wrapper with threading.Thread The easiest way to catch exceptions in a thread is to ... Read More

Sarika Singh
266 Views
In Python, you can catch an exception and raise a new one, while keeping the original exception for more details. This helps when you want to change a low-level error into a clearer, higher-level error that fits your application better. Sometimes, catching a specific exception and raising a new ... Read More

Sarika Singh
1K+ Views
Python allows you to run multiple tasks at the same time using threads. However, handling exceptions in threads can be tricky because exceptions that happen inside a thread don't get passed to the main thread by default. To deal with this, you can catch errors inside the thread's function or ... Read More

Sarika Singh
890 Views
The OSError in Python is commonly encountered when a system-related error occurs, such as a file not found, permission denied, or disk I/O errors. It is one of the built-in exceptions that helps in handling operating system-level failures. In this article, you will learn how to catch and handle OSError ... Read More

Sarika Singh
3K+ Views
You cannot directly use an if statement to catch exceptions in Python. Instead, use a try-except block and place if conditions inside the except to respond differently based on the type or message of the exception. This allows you to write conditional logic for exception handling. Using if Inside the ... Read More

Sarika Singh
1K+ Views
The NotImplementedError exception in Python is raised when an abstract method or operation that should be implemented by a subclass is not implemented. It is commonly used as a placeholder in base classes to indicate that subclasses are expected to override the method. In this article, you will learn how ... Read More