Posts from Python

Code Golfing Tricks in Python

By Reetesh Kumar

In this tutorial, we will learn basic code golfing tricks in Python. Code Golfing means writing a statement or expression using a minimum number of characters. In simple words, we .... Read More

Connect To PostgreSQL Database Server using Python

By Tushit Garg

This tutorial teaches us how we can connect to the PostgreSQL Database Server using Python programming. As we all know that to connect to a database or something like that, we need.... Read More

Count ways to reach the n’th stair in Python

By Reetesh Kumar

In this tutorial, we’ll learn how to count the number of ways to reach the n’th stair in Python. We need to reach the top of the staircase which has n steps. At each st.... Read More

Python Program to print Zigzag Pattern

By Reetesh Kumar

In this tutorial, we will learn to print Zigzag Pattern in Python. Basically in a Zigzag pattern, we need to print numbers in sequential order in odd rows and reverse order in even.... Read More

Matrix inversion without NumPy in Python

By Tushit Garg

This article teaches you how you can do matrix inversion without the use of NumPy in Python. The inversion of a matrix is useful in solving a system of linear equations. Though the.... Read More

Connect points with line in Matplotlib

By Tushit Garg

In this article, we are going to learn how we can connect points on a plot with a line in Matplotlib Python library. At times when working with a scatter plot, we need to connect a.... Read More

How to check for Majority Element in a sorted array in Python

By Divya Junuthula

In this tutorial, we are going to learn how to check whether the given element is the majority element or not in the given sorted array in Python. First of all, we will learn what .... Read More

Find Pair with given sum and maximum shortest distance from end in Python

By Taanvi Goyal

In this given problem we have to find a pair with a given sum and maximum shortest distance from the end. Here we have an array size A with contains all A integer values and anothe.... Read More