Python String

Strings – you use it in every program, just like any other programming language. Learn about Strings in Python and how to manipulate them in the Pythonic way.

Adding commas into number string

Adding commas to an integer string in Python involves formatting the numerical data to improve its readability and presentation. Python offers various built-in functions and modules to add commas to integer strings, such as the format() function, the locale module, and regular expressions. These tools allow developers to format integer strings in different ways based …

Adding commas into number string Read More »

How to use Python Raw Strings?

Hello everyone! In this article, we’ll be looking at how we can use Python raw strings. This is a powerful feature of Python, using which we can introduce “raw-strings”, without escaping any characters. A Python raw string is a normal string, prefixed with a r or R. This treats characters such as backslash (‘\’) as …

How to use Python Raw Strings? Read More »

Using Python String format_map()

In this article, we’ll take a look at thePython String format_map() method. This method returns a formatted version of the string using a map-based substitution, using curly brackets {}. Let’s understand this properly, using a few examples. Basics of Python String format_map() The Python String format_map() function is available from Python 3.2 onward, so make …

Using Python String format_map() Read More »