Skip to content

Tag Archives: python-string

Title case is a style of writing that is used for the titles of articles, books, movies, and other works. The rules for writing in… Read More
Spanning strings over multiple lines can be done using python’s triple quotes. It can also be used for long comments in code. Special characters like… Read More
In Python an integer can be converted into a string using the built-in str() function. The str() function takes in any python data type and… Read More
In Python an strings can be converted into a integer using the built-in int() function. The int() function takes in any python data type and… Read More
Alice and Bob made a list of topics and both of them voted if they like or dislike the topic. They wrote 0 to denote… Read More
Given the string, the task is to capitalize the first and last character of each word in a string.  Examples: Input: hello world Output: HellO… Read More
Given a String comprising of many words separated by space, write a Python program to iterate over these words of the string. Examples: Input: str… Read More
Python slicing is about obtaining a sub-string from the given string by slicing it respectively from start to end.  How String slicing in Python works… Read More
In Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have a character data type, a single character is simply a… Read More
Data conversion has always been widely used utility and one among them can be the conversion of a binary equivalent to its string. Let’s discuss certain… Read More
String Interpolation is the process of substituting values of variables into placeholders in a string. Let’s consider an example to understand it better, suppose you… Read More
While coding or improvising your programming skill, you surely must have come across many scenarios where you wished to use .split() in Python not to… Read More
Given two strings A and B and these strings contain lower case letters. The task is to tell the length of the merged strings. For… Read More
In Python3, string.printable is a pre-initialized string used as string constant. In Python, string.printable will give the all sets of punctuation, digits, ascii_letters and whitespace.… Read More
In Python, string capwords() method is used to capitalize all the words in the string using split() method.   Syntax: string.capwords(string, sep=None) Return Value: Returns a formatted… Read More

Start Your Coding Journey Now!