This tutorial will show you how to convert a distance of meter to yard. If you are getting the value in one unit, you need to convert it to a different unit if your program is working on a separate unit. This is a commonly faced problem. If you are using any third-party APIs and if that API returns data in meter, you need to convert it to yard if you are showing the information in yard to the user.
ReadIn this tutorial, we will learn how to remove the kth occurrence of a word in a given list. The list is given. It contains words and most words are repeated. We will create one function to remove the kth occurrence of one word if it is available in the list. If it is not available, it will show one message.
ReadIn this tutorial, I will show you how to find the area and perimeter of a triangle in Python. For calculating both area and perimeter, we need the values of the sides of the triangle. So, the program will take the sides as input from the user and calculate the values.
ReadDictionary is used to store key-value pairs. We can sort the items in a dictionary based on the values. In this tutorial, I will show you how to sort a python dictionary based on its values.
ReadThis program will show you how to get the cube sum of first n natural numbers in python. The program will take the value of n as an input from the user, calculate the sum of cube and print it out.
ReadIn this tutorial, we will learn how to find the product of all odd and even numbers in a list. The program will take the list values as input from the user and print out the product. With this program, you will learn how to use a for loop,if-else condition and how to take inputs in python.
ReadIn this tutorial, we will learn how to find the key of a dictionary with maximum value in python. We will learn different ways to solve this problem. In these examples, we will use one predefined dictionary.
ReadNested lists are lists holding other lists as its elements. These are also called lists of lists. If you want to flatten a nested list, you can easily do it by running a couple of for loops. In this tutorial, we will learn how to flat a nested list using a couple of different approaches.
ReadIn this tutorial, we will learn how to find out all numbers in a string using python. The program will take one string as an input from the user. It will find out all numbers in that string and print them on the console.
ReadPython OS module provides different methods to perform different operating system tasks like create a directory, delete a directory, etc. In this post, we will learn how to check if a directory exists or not and to create one directory if it doesn't exist.
Read