Posts from Python

Merge two or multiple NumPy arrays using hstack(), vstack, dstack

By Rudresh

In this tutorial, we will learn how to merge two arrays. We can easily do this by various functions provided by numpy. We have concatenate(),  hstack(), vstack() and dstack() to g.... Read More

OpenCV INTER_AREA with its example

By Muskan Bani

Python’s OpenCV module offers a lot of flexibility. For scaling an image, OpenCV offers a range of interpolations. We are here to examine INTER_AREA, which provides pixel are.... Read More

Count the total number of words in a sentence in Python

By Vimal Pandey

In this post, we will learn to count the total number of words in a sentence in Python. For this, we will use different inbuilt Python functions. So welcome back guys in this tutor.... Read More

Print NumPy array without commas in Python

By Muskan Bani

This post will print an array without any commas in Python. We will be tackling this problem with the help of loops. To be more specific we are going to use For loop. For loop iter.... Read More

Actual purpose of exec() in Python

By Khushi Aswani

In this tutorial, we will discuss exec() in Python, which is responsible for the dynamic execution of a string or an object. Syntax for exec() exec(object[, globals[, locals]]) obj.... Read More

Detect mouse clicks in Python with position using pynput

By Harsh Parmar

In this tutorial, you will learn how to detect mouse clicks in Python. This program will exactly print the location and the button name which is clicked. We have to install pynput .... Read More

Pretty print of a 2D list in Python

By Kovid Bhatt

In this text, we will learn how to get a pretty print of a 2D list in Python. Lists can be one-dimensional, 2-dimensional, and three-dimensional. As a part of this tutorial, we are.... Read More

Terrorism Detection and Classification using kNN Algorithm

By Sanskar

KNN or k-Nearest Neighbour algorithm is one of the most basic and popular algorithms of machine learning. It finds its application in fields like image processing, web data mining,.... Read More