Skip to content

Tag Archives: Python string-programs

Given a String, the task is to write a Python program to remove the nth index character from a non-empty string Examples: Input: str =… Read More
Given Strings Matrix, the task is to write a Python program to count strings which can be made from letters from given list. Examples: Input… Read More
Given Strings List, the task is to write a Python program to perform sort on basis of difference of cases i.e count of lower case… Read More
Given the String list, write a Python program to compute sum of lengths of custom indices of list. Examples: Input : test_list = [“gfg”, “is”,… Read More
Given Matrix, write a Python program to extract rows which only contains alphabets in its strings. Examples: Input : test_list = [[“gfg”, “is”, “best”], [“Geeks4Geeks”,… Read More
Given a String, the task is to write a Python program to extract strings of N size and have K distinct characters. Examples: Input :… Read More
Prerequisite: itertools Given a String, the task is to write a Python program to break up the string and create individual elements. Input : GeeksForGeeksOutput… Read More
Given a string, the task is to write a Python program to perform sort by maximum occurring character. Input : test_list = [“geekforgeeks”, “bettered”, “for”,… Read More
Given Strings List, the task is to write a Python program to group them into K length suffix. Input : test_list = [“food”, “peak”, “geek”,… Read More
Given a String, the task is to write a Python program to count the minimum elements required to form a string from list elements. Input… Read More
Given a String, the task is to write a Python program to increment the number which is at end of the string. Input : test_str… Read More
Given two strings. The task is to find the larger string without using built-in functions. Examples: Input: GeeksforGeeks Geeks Output: GeeksforGeeks Input: GeeksForFeeks is an… Read More
Reverse the characters in all words in a line including numbers, but leave special characters and symbols untouched in the same position. Consider the below… Read More
Prerequisites: isnumeric() method – Python Given a string, containing digits and letters, the task is to write a Python program to calculate the number of… Read More
Given two strings. write a Python program is to find which letters are in the two strings but not in both. Example: Input: india australia… Read More