DEV Community


Partition Function with Python

hvaandres profile image Andres Haro ・1 min read

The partition() method searches for a specified string and splits the string into a tuple containing three elements. The first element contains the part before the specified string. The second element contains the specified string. The third element contains the part after the string.

Discussion (0)

Forem Open with the Forem app