A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/python/split_and_join.htm below:

Split and Join Methods

Split and Join Methods

Python has the following methods to perform split and join operations −

Sr.No. Method & Description

1

lstrip()

Removes all leading whitespace in string.

2

rstrip()

Removes all trailing whitespace of string.

3

strip()

Performs both lstrip() and rstrip() on string

4

rsplit()

Splits the string from the end and returns a list of substrings

5

split()

Splits string according to delimiter (space if not provided) and returns list of substrings.

6

splitlines()

Splits string at NEWLINEs and returns a list of each line with NEWLINEs removed.

7

partition()

Splits the string in three string tuple at the first occurrence of separator

8

rpartition()

Splits the string in three string tuple at the ladt occurrence of separator

9

join()

Concatenates the string representations of elements in sequence into a string, with separator string.

10

removeprefix()

Returns a string after removing the prefix string

11

removesuffix()

Returns a string after removing the suffix string

python_string_methods.htm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4