0

Python 3 Split and Join Strings

This post shows how split and join strings in Python 3.

Using Python 3.7.0.

Split Strings

By Space

The following codes split a string by space. This is the default behavior of the split function.

This outputs:

By other String

This outputs:

Join Strings

The way to join strings is to use the string object’s join function.

This outputs:

Karl San Gabriel

Karl San Gabriel

Java and Enterprise Technologies Expert