The Wayback Machine - https://web.archive.org/web/20221118165401/https://www.geeksforgeeks.org/category/python-programs/
Skip to content

Category Archives: Python Programs

Reverse Polish ‘Notation is postfix notation which in terms of mathematical notion signifies operators following operands. Let’s take a problem statement to implement RPN Problem… Read More
Given a list of N integers, the task is to write a Python program to find the index of the maximum element in the Python… Read More
In this article, we will learn to remove elements from a list that is larger than a specific value in Python. Example  Input: [12, 33,… Read More
 Given a string containing numbers and alphabets, the task is to write a Python program to separate alphabets and numbers from a string using regular… Read More
Given a string, the task is to write a Python program to reverse only the consonants of a string without affecting the other elements’ positions.… Read More
Given a number n, find the cube root of n.Examples:   Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output: Cubic… Read More
Given an integer X, find its square root. If X is not a perfect square, then return floor(√x). Examples :  Input: x = 4Output: 2Explanation:… Read More
In this article, we will learn how to print the pattern G using stars and white-spaces. Given a number n, we will write a program… Read More
Given the Cost Price(CP) and Selling Price(SP) of a product. The task is to Calculate the Profit or Loss.Examples:   Input: CP = 1500, SP =… Read More
Given a string, convert the characters of the string into opposite case,i.e. if a character is lower case then convert it into upper case and vice-versa. … Read More
Given numeric string str, the task is to remove all the leading zeros from a given string. If the string contains only zeros, then print… Read More
Given a set, the task is to write a Python program to delete the last element from the set. Example: Input: {1,2,3,4}Remove 4Output: {1,2,3} Input:… Read More
Given a string, the task is to write a Python program to remove the last character from the given string. Example: Input:  “GeeksForGeeks” Output: “GeeksForGeek”… Read More
In this article, we will learn what are the different ways to add values in a dictionary in Python.  Method 1: Assign values using unique… Read More
Given an integer basic and a character grade which denotes the basic salary and grade of a person respectively, the task is to find the… Read More

Image

Start Your Coding Journey Now!