
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 118 Articles

Sarika Singh
2K+ Views
In Python, function names follow specific rules. A valid function name can only contain certain characters, and it must follow the naming conventions defined in the Python language syntax. Using the correct characters ensures that your code runs without syntax errors and stays readable. Allowed Characters in Function Names Python ... Read More

Sarika Singh
1K+ Views
You can handle errors in Python using the try and except blocks. Sometimes, we also want to store the actual exception in a variable to print it or inspect it. This is done using the as keyword in modern Python. But if you have seen older code, you might find ... Read More

Sarika Singh
292 Views
In Python, the assert statement is used for debugging purposes. It tests whether a condition in your program returns True, and if not, it raises an AssertionError. This helps you catch bugs early by verifying that specific conditions are met while the code is executing. Understanding the Assert Statement The ... Read More

Sarika Singh
902 Views
In Python, a KeyError exception occurs when a dictionary key that does not exist is accessed. This can be avoided by using proper error handling with the try and except blocks, which can catch the error and allow the program to continue running. Understanding KeyError in Python A KeyError is ... Read More

Sarika Singh
499 Views
In Python, the try, except, and finally blocks are used to handle exceptions. These blocks allow you to catch errors that occur during the execution of a program and respond accordingly, which helps to prevent your program from crashing. Try and Except Blocks The try block contains code that ... Read More

Sarika Singh
2K+ Views
In Python, you need to use the built-in json module to work with JSON data. When you want to return data from a function in JSON format, you can use the json.dumps() function to convert a Python dictionary (or similar object) into a JSON string. This is helpful when making ... Read More

Sarika Singh
342 Views
When you write tests in Python, it is important to make sure that your function raises the correct exception for invalid input or unexpected conditions. This helps to confirm that your code handles errors properly. You can test exceptions using the following ways in python − Using the try-except ... Read More

Sarika Singh
3K+ Views
Camel case and snake case are ways of writing words together when we are programming. In camel case, we write words together without spaces and we start each new word with a capital letter except for the first word. For example, if we want to write a variable name for ... Read More

Sarika Singh
688 Views
In Python, when you pass arguments to a function, they are passed by object reference. This means the function gets a reference (or pointer) to the actual object, not a copy of it. However, how this reference affects the object depends on whether the object is mutable or immutable. ... Read More

Sarika Singh
52K+ Views
In Python, you can pass optional parameters to functions, allowing you to call a function with fewer arguments than specified. Optional parameters are useful for providing default values when certain arguments are not provided. Python provides different ways to define optional parameters, including default values, variable-length argument lists, and keyword ... Read More