python

python

end parameter in python print statement and how to use it

Learn what is end parameter in python and how we can use it in print statement.

Read
python

Python program to find change in percentage between two numbers

In this post, I will show you how we can find the *change in percentage* between two numbers in python.

Read
python

Python program to calculate discount based on selling price

In this post, we will learn how to find the discount and amount to pay based on predefined discount percentage

Read
python

How to take inputs from user in Python

In this tutorial, we will learn how to take inputs from the user in python with examples of sys.stdin and input() methods of python

Read
python

Python map(lambda) function explanation with example

Learn how to use map in python with an iterable like list or tuple. map takes one function and applies it on each element of the iterable. It returns the modified iterable.

Read
python

How to accept sequence of numbers in python and find out the average

Python program to accept a sequence of numbers. In this post, we will write one python program that takes one sequence of numbers from the user and prints out the average value.

Read
python

python program to do inplace replace of string in a file

Python program to do inplace replacement of strings in a file. Read the file line by line and replace one specific string in the lines of the file.

Read
python

Python program to generate secure random string of length n

Python program to generate secure random string of length n. Learn random.choice and secrets.choice methods and how these methods works.

Read
python

How can we print spaces in python

Learn how to print spaces or blank spaces in python. We will learn two different ways to print spaces in python - by using print() and using a variable.

Read
python

Python program to find all indices of a character in a string

This program will show you how to find all indices of a character in a user provided string. We will take both the string and character from the user and print out all indices of that character.

Read