#3 Python – STRING(Python Tutorial for Beginners 2: Strings – Working with Textual Data)

Python string definition
A string in Python is a sequence of characters. It is a derived data type. Strings are immutable. This means that once defined, they cannot be changed. Many Python methods, such as replace(), join(), or split() modify strings. However, they do not modify the original string. They create a copy of a string that they modify and return to the caller.

Python string literals
Python strings can be created with single quotes, double quotes, or triple quotes. When we use triple quotes, strings can span several lines without using the escape character.

Post Author: hatefull