python

python

Python program to remove all duplicate elements from a list

In this tutorial, we will learn how to remove all duplicate items from a list and create a new list by removing all duplicate items.

Read
python

Write a python program to reverse a number

This is one of the most common questions asked in a Junior level programming interview. I have not found any real project that requires to reverse a number. Maybe if you are implementing some kind of logic or puzzle games, this program will come in handy.

Read
python

Python program to calculate simple interest

Python examples to calculate simple interest with user-given values in two ways. We will learn how to solve this by using a separate function and without using a function.

Read
python

Python example program to split a string at linebreak using splitlines

Line split or string split is one of the most common problems we faced in our development journey. For example, the server is sending us a list of comma separated values and we need to split all the values and put them in a list. The easiest way to solve this problem is to split the string.

Read
python

Python swap case of each character of a string

This tutorial will show you how to swap case of each character of a string. For example, if the string is Hello, it will change it to hELLO.

Read
python

How to remove an item from a list in python

In this tutorial, we will learn how to remove an item from a list in python.  We can divide this problem into three categories- removing an element using its value, using an index and remove all elements.

Read
python

Convert string to float in python

Python program to convert string to float. This tutorial will show you how to convert one single item or list of string items to float in python with different examples.

Read
python

Python Set intersection example

Union and intersection are two important set-operations. In this blog post, we are going to discuss the intersection of two sets in Python. An intersection is used to find out the common elements between two Sets. Symbol ‘∩’ is used to denote intersection. Set contains common elements and the intersection of two sets will find out all common elements between the two sets.

Read
python

Find out the multiplication of two numbers in Python

Python program to find out the multiplication of two numbers. We will take the numbers as inputs from the user to find out the multiplication. Learn how to find the multiplication with example.

Read
python

Python translate method

In this tutorial, we will learn how to replace multiple characters of a string with a different set of string. This is also known as the translation of a string. Python provides one inbuilt method to do the translation. I will show you one example below to implement this operation in python.

Read