Posts From 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.

Python String Functions

Python has built-in functions for almost every operation that is to be performed on a string. To make it simple, these are classified on the basis of the frequency of their use as well as their operations. They are as follows : Python String Functions Classification Basic Functions Advanced Functions Miscellaneous (These functions are not […]

String Concatenation in Python

Concatenation is a method of joining strings together to form a new string altogether. The following are the methods to perform String Concatenation in Python: By using + operator By using join() method By using % operator By using format() function By Literal String Interpolation By using StringIO from IO Module By using += concatenate operator 1. […]

How to Check if a String contains a Substring in Python?

A substring is a sequence of characters within a String. The following are the methods in Python to check if a string contains another string i.e. substring. By using find() method By using in operator By using count() method By using str.index() method By using operator.contains() method Method 1: By using find() method The method […]

Python String capitalize() Function

String in Python has built-in functions for almost every action to be performed on a string. Python String capitalize() function is used to convert only the first character to the uppercase letter, rest all characters are lowercase. Key Points : Return Type: String Parametric Values: No parameters can be parsed onto capitalize() function. Converts only […]