String Basics and Indexing
Learn string creation, indexing, and basic operations.
Introduction
A string is an ordered sequence of Unicode characters. You can access individual characters by their position (index).
String Literals
Create strings with 'single', "double", or '''triple''' quotes. Triple quotes span multiple lines.
s = 'hello'
t = "world"
print(s, t)All lessons in this course
- String Basics and Indexing
- String Slicing and Concatenation
- Common String Methods
- String Formatting with f-strings