Interview Question

What are strings in Python?

str represents immutable Unicode text.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

A Python string is an immutable sequence of Unicode code points. • Strings support indexing, slicing, iteration, and many methods. • String operations create new strings rather than changing the original. • Text encoding and decoding convert between str and bytes.

💡 Simple Example

text = 'Python' print(text[0]) print(text.lower())

Output

P python

⚡ Quick Revision

str represents immutable Unicode text.