Skip to content

Tag Archives: Python string-programs

While working with strings, many times, we can come across a use case in which we need to find if a string has in it… Read More
Given a string, with different key-value pairs separated with commas, the task is to convert that string into the dictionary. These types of problems are… Read More
Given a string and a number ‘n’, the task is to remove a string of length ‘n’ from the start of the string. Let’s a… Read More
Given a string, write a Python program to find whether a string contains only numbers or not. Let’s see a few methods to solve the… Read More
Given a string and a substring, the task to find out the starting index for all the occurrences of a given substring in a string.… Read More
While working with strings, sometimes, we require to get the size of the string, i.e the length of it. But there can be situations in… Read More
Sometimes, while working with strings, we have the task of combining two strings, i.e interleaving them according to utility. This type of utility is mostly… Read More
While programming, sometimes, we just require a certain type of data and need to discard other. This type of problem is quite common in Data… Read More
Sometimes, rather than initializing the empty string, we need to initialize a string in a different way, vis., we may need to initialize a string… Read More
In Python, String is immutable datatype, what this means is, that there are lot many restrictions when one handles its manipulation. The problem of adding… Read More
Sometimes we need to manipulate our string to remove extra information from the string for better understanding and faster processing. Given a task in which… Read More
Given a string, write a Python program to get the substring from given string using list slicing. Let’s try to get this using different examples.… Read More
Given a string and a character, your task is to find the first position of the character in the string using Python. These types of… Read More
Given two lists of strings string and substr, write a Python program to filter out all the strings in string that contains string in substr.… Read More
Many times it is desirable to work with the strings that only contain alphabets and the other special characters are undesirable and sometimes this very… Read More

Start Your Coding Journey Now!