Python 3 Split and Join Strings

Last Updated on

This post shows how to 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

Professional Software Developer