
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
AmitDiwan has Published 10744 Articles

AmitDiwan
466 Views
Yes, we can work around C Language’s ternary operator in Python as well i.e. a similar way do exist. Let us first see an example of C Language’s ternary operator − Example #include int main() { int x = 10; int y; ... Read More

AmitDiwan
318 Views
If your Python program is too slow, you can follow the below given tips and tricks − Abstraction Avoid excessive abstraction, especially under the form of tiny functions or method. Abstractions tend to create indirections and force the interpreter to work more. If the levels of indirection outweigh the amount ... Read More

AmitDiwan
254 Views
Example In this article, we will see if you will change a list, let’s say List y will also change list x. For this, let us first see an example with two lists and try to append() and print − x = [] y = x print("Value of y = ... Read More

AmitDiwan
2K+ Views
The concept of arguments and parameters are part of Functions in Python. Therefore, before moving further let us learn how to create a function and parameterised function. A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for ... Read More

AmitDiwan
1K+ Views
To pass optional or keyword parameters from one function to another, collect the arguments using the * and ** specifiers in the function’s parameter list But, at first, do know what are *args and **args in Python. Let us understand them − Variable-length/ Arbitrary arguments in Python (*args) Example When ... Read More

AmitDiwan
2K+ Views
The default values concept in Python are based on using mutable or immutable objects. It is good programming practice to not use mutable objects as default values. Instead, use None as the default value to avoid issues. Immutable objects such as numbers, strings, tuples, and None, are safe from change. ... Read More

AmitDiwan
2K+ Views
The import statement, just like any other statement or keyword in Python should be used and added to the code properly following the best practices. Let’s see them one by on − Multiple Imports Multiple Imports should usually be on separate lines. For example − import numpy import pandas import ... Read More

AmitDiwan
5K+ Views
To share global variable across module in Python, let us first understand what are global variables and its scope. Global Variable ExampleIf a variable is accessible from anywhere i.e. inside and even outside the function, it is called a Global Scope. Let’s see an example − # Variable i = ... Read More

AmitDiwan
106 Views
Before understanding why Python lambdas defined in a loop with different values all return the same result, let us first learn about Lambda. Python Lambda The Lambda expressions allow defining anonymous functions. A lambda function is an anonymous function i.e. a function without a name. Let us see the syntax ... Read More

AmitDiwan
5K+ Views
A slash in the argument list of a function denotes that the parameters prior to it are positional-only. Let us first see a function in Python with a parameter − Function in Python Example Here, we are creating a basic function in Python with a parameter myStr − # Creating ... Read More