Category Archives: String Methods

Python has many built-in methods available for performing repetitive tasks which are related to python strings data type.

This python strings category contains details all the built in strings methods. Also this category contains information like parameters a string method takes along with its examples.

Python string count() method.

In this article we are going to learn python string count() method which is associated with python string data type. Python string count method is used to count the number of occurrences of sub-string in a string. Basically it counts the number of overlapping occurrences of a sub-string. It searches the sub-string in a given string and returns how many times the sub-string is repeated. String count method in python is useful to find out how many times a specific character or a word or a

Read More

Python list comprehension along with examples

In this article, We are going to learn how list comprehension works along with its examples. So basically Python List comprehension is a simple and elegant way of creating a list in python. It returns us a new list after performing specified operation on each element of iterable (List or sequence). List comprehension requires a input list and operation statement. During the execution of program it takes each element of input list and will perform specified operation on that element. Output after performing operation will be

Read More

Python String Split method

In this article we are going learn about how python split method is used to split the string and produce a list. What is the syntax of python split. Sometimes we may want to break the long string and convert it into a small segments of strings. Python split is an action opposite to the string concatenation i.e in string concatenation we join multiple strings into one. Whereas using python split we can break the string into required segments. This purpose can be served using built-in

Read More