Category Python

Lists in Python | Create List, Example

Characteristics of Lists in Python

Sequences are the most basic type of data structures in Python. The data structure provides us with a style to store multiple data or values in the memory. A sequence is a data type that represents a group or collection…

Python str() Function

str() function in Python is a built-in function that converts the specified value or object into a string. This function returns a string nicely printable representation of the specified object. The general syntax of str() function is as follows: str(object)…

Substring in Python

Substring in Python

Substring in Python is a subset of the main string specified by a range of indices. It is also a sequence of characters that is a portion of a given string. Basically, substring is a extracting part of a string.…

Python String Methods (with Examples)

Python String methods

A string in Python is an object with lots of methods and functions in it. In Python, a function defined with respect to a particular object is called method. A string method does not modify the original string. It always…

String Formatting in Python

In this tutorial, we will learn about string formatting or how to format string in Python with the help of examples. String formatting is a way to present a string value to provide a better view on the console. It…