String in Python Programming
In this lesson, we will understand what is string and its various uses with the help of some examples.
What is String
String in Python is a sequence of Unicode characters, used primarily to store text. Python treats strings as a sequence data type, meaning that characters are stored in memory one after another.
Python doesn't have a separate character data type; even a single character is considered a string with a length of one.
Strings are immutable, meaning their characters cannot be changed directly after the string is created.
A Unicode character is a symbol used in writing or communication that is assigned a unique code by the Unicode standard, allowing it to be recognized and displayed consistently across different devices, platforms, and languages. Unicode includes characters from many languages, symbols, and even emojis.
Let’s explore different ways to use strings in a Python program.
Unlock This Lesson & Start Learning!
Get full access to this lesson, practical exercises, quizzes, and your Mentora AI Tutor.
Special Offer, use coupon code DWL6BC to get additional discount of 10% on all subscription. Hurry limited time offer.
1 Month
Renews at ₹259/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
3 Months
Equivalent to ₹219.67/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
6 Months
Equivalent to ₹193.17/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor
12 Months
Equivalent to ₹179.92/month.
Manual renewal required.
No automatic charges.
- Premium lessons access
- Quizzes and exercises
- Mentora AI Tutor