Python articles and tutorials related to string and its operations.
Summary: In this tutorial, you will learn to compare two strings case-insensitively (i.e., ignore case) in Python. When comparing two strings, Python interprets uppercase and lowercase letters differently. For example,…
Summary: In this tutorial, you will learn two different ways to interpolate strings in Python. Interpolation is the process of evaluating strings that contain one or more placeholders for substitution…
Summary: In this programming example, you will learn different ways to remove whitespaces from a string in Python. Use strip() to remove the Leading and Trailing Whitespace Call the strip()…
Formatting currency converts the currency amount of floating or integer type into a comma-separated string that represents the amount of money. The majority of the currencies separate every three digits…
Summary: In this programming tutorial, we will learn different ways to check if the given string has any character as a number in Python. Method 1: Using for loop with…
Summary: In this tutorial, we will learn different ways to check for multiple substrings in another string in Python. Return True if the string contains any of the given substrings.…