Python Fundamentals / Getting started
Lesson 7 of 38
Strings
Strings are text in quotes. You can join them with +, repeat them with *, and get their length with len().
Key points
- Single or double quotes both work
- len("abc") is 3
- Strings can't change in place
word = "cyber"
print(word.upper()) # CYBER
print(len(word)) # 5Quiz · +10 XP
What does len("hello") return?
Log in to save progress and earn XP.