Skip to content

Python Strings

Syntax

Strings in Python are sequences of characters enclosed in single (') or double (") quotes.

# Creating strings
single_quote_string = 'Hello World'
double_quote_string = "Hello World"
# Using multi-line strings
multi_line_string = '''This is
a multi-line string.'''