Vijaykrishna Ram

Python hashlib Module

The Python hashlib module is an interface for hashing messages easily. This contains numerous methods which will handle hashing any raw message in an encrypted format. The core purpose of this module is to use a hash function on a string, and encrypt it so that it is very difficult to decrypt it. Typically, an […]

Python hashlib Module Read More »

Python Queue Module

In this article, we shall look at the Python Queue module, which is an interface for the Queue data structure. Python Queue A Queue is a data structure where the first element to be inserted is also the first element popped. It’s just like a real-life queue, where the first in line is also the

Python Queue Module Read More »

Python timeit Module

The Python timeit module is a simple interface to quickly measure the execution time for small blocks of code. When you are creating an application, you may wonder how this block of code will perform and would want to test it under different scenarios. For this, the timeit module provides a very simple solution to

Python timeit Module Read More »

Python unittest Module

In this article, we’ll cover the Python unittest module and some of its common use cases. But before that, let’s understand why we need this module in the first place. Why should you use the unittest Module? When you’re working with large code-bases, Application development is often categorized into two phases. Development Phase Testing Phase

Python unittest Module Read More »

Python json Module

Before we dive into the Python JSON module, let’s understand what JSON is. The JSON (JavaScript Object Notation) is a standardized format that allows exchanging of data across the internet. Since this has become the standard for any information exchange through the internet, it makes sense for any Python application to send and receive data

Python json Module Read More »

Python Iterator

A Python Iterator is an object that can be iterated upon. Any kind of object that supports this kind of iteration is called as an iterator. Now, you may be confused. There exists another object called iterable. What is that? Let’s take a look. Iterators and Iterables Any iterable is an object that can be

Python Iterator Read More »

Python string zfill()

The Python string zfill() method is used to pad a string with zeros on the left until a specific width is reached. This is the most “Pythonic” way to add padding to a string, instead of manually iterating using for loops. Syntax of Python String zfill() Method The Python string zfill() function belongs to the

Python string zfill() Read More »

Python String lower() Method

Python String lower() method converts a string object into a lower case string. This is one of the builtin string functions in Python. Since strings are immutable in Python, this method only returns a copy of the original string. Syntax and Usage of Python String lower() Method Format: Here, str_copy is the lowercase string of

Python String lower() Method Read More »

Python Print Without Newline

There are different ways through which we can print to the console without a newline. Let’s quickly go through some of these methods. 1. Using print() We can use the print() function to achieve this, by setting the end (ending character) keyword argument appropriately. By default, this is a newline character (\n). So, we must

Python Print Without Newline Read More »