Python ProgrammingPython Programming

Python String Examples

You'll learn basic string operations, formatting strings and the examples shown in this tutorial will help you make better use of strings.

Strings in programming are simply text, either individual characters, words, phrases, or complete sentences. Python strings have powerful text-processing features, including searching and replacing, trimming characters, and changing case. Empty strings are written as two quotes with nothing in between. The quotes used can be either single or double. Multi-line strings can easily be created using three quote characters.