Posts from Python

Python Program to find Maximum number possible by doing at-most K swaps

By Aayush Dubey

In this tutorial, we will see how to find the maximum number possible by doing at most K swaps in the number in Python. Consider the following examples: INPUT: Number=189 K=1 OUTPU.... Read More

How to calculate Average of a stream of numbers by program in Python

By Aayush Dubey

In this tutorial, we will see how can we calculate the Average of a stream of numbers in Python. Average is also known as the mean. Average or mean are terms related to mathematics.... Read More

Catching Crooks on the Hook in Python Using Machine Learning

By Abhishek Prasad

In today’s world crime is increasing day by day and the numbers of law enforcers are very less so to reduce crime we can use machine learning models to predict whether the pe.... Read More

How to sort a Dictionary by value in Python

By Varsha Neelamma

In this tutorial, we will learn how to sort a Dictionary by value in Python. The values in a Python dictionary can be of any data type and can be repeated too. However, the keys in.... Read More

How to add space after dot or comma in Python string

By Anamika Roy

We are going to learn about adding space after dot or comma in a string, using Python programming language in this tutorial.  It is used in many cases like while making software, .... Read More

Take user input and save those in .txt file using Python

By Yashkumar Patel

In this tutorial, we will learn how can we take input from users and save these inputs into a .txt file. These types of things are useful for developers as they need to store the d.... Read More

Remove duplicates from a dictionary in Python

By Varsha Neelamma

When you are working with Python dictionaries, you may come across situations where you have duplicate values present in the dictionary. This can, in some situations, hinder your p.... Read More

Print a line to STDERR and STDOUT in Python

By ANJANEYULU DEVARASETTY

In this tutorial, we will discuss how to print a line to STDERR and STDOUT in Python. In Python, there are standard terms like Stdin, stderr, stdout, etc. Let’s see about the.... Read More