In this tutorial we will discuss assertion in python, and how we can use the assert keyword to perform assertion. Assertion Assertion is a special statement we use in python, and it is similar to the if statement. Like an, if statement assertion statement works on boolean data types and shows result according to the… Read More »
In this tutorial, we will discuss what is a shallow and deep copy in python. Copy using Assignment operator: Normally we use the Assignment (=) operator to copy an object. In python when we use the assignment operator to perform the copy operation it does not create a copy of the old value to the… Read More »
In this tutorial, we will discuss python list comprehension, with some of its examples. List Comprehension List comprehension is a shorthand to create a list using for loop, within a line. With the help of List comprehension, we can easily create a list from existing iterable data objects (string, list, dictionary, tuple, and set). List… Read More »
Python User-defined Exception In this article, we will discuss how can we create our own custom exception using some keywords in python. In python, we can create our exception, and give them name whatever and raise them whenever we want. As we know, when the python interpreter finds any error and raises a statement in… Read More »
In python, we have a very powerful 3rd party library NumPy which stands for Numerical Python. In standard python we do not have support for standard Array data structure like what we have in Java and C++, so without a proper array, we cannot form a Matrix on which we can perform direct arithmetic operations.
In this tutorial we will discuss nested dictionaries in python, we will learn how can we create and excess nested dictionaries and its elements. With the help of some examples, we will also modify the nested dictionary elements. A normal dictionary is a collection of key: value pairs, and all the keys and their corresponding… Read More »
In this tutorial, we will discuss some loop conditions and techniques to control the loop flow and its execution. We will also discuss how can we use the break and continue statements inside a loop. In python, we have two loop statements for and while. We use for loop when we have a certain number,… Read More »