Introduction to Strings
Learn about string creation, usage, indexing, and properties.
We'll cover the following...
What is a string?
A Python string is a collection of Unicode characters. Python strings can be enclosed in single, double, or triple quotes, as shown below:
'
BlindSpot'
"
BlindSpot"
'''
BlindSpot'''
"""
Blindspot"""
Press + to interact
# simple stringsmsg1 = 'Educative'print(msg1)
If there are characters like '
, "
, or \
within a string, they can be retained in two ways: ...