Strings in Python
Strings are one of the most common data types in Python – they represent text, like words, sentences, or even whole stories!
In Python, strings are easy to create and work with. Let’s explore them step by step with simple examples you can try right away.
Creating Strings
You can create strings with single quotes, double quotes, or triple quotes (for multi-line strings).
Concatenation – Joining Strings
Use the + operator to join strings together.
Repetition
Multiply a string with * to repeat it.
Indexing and Slicing
Strings are sequences – you can access characters by position (index starts at 0).
Strings Are Immutable
You cannot change individual characters in a string – it's immutable.
String Length
Quick Quiz
Az anyagokat átnéztük és ellenőriztük, de hibák továbbra is előfordulhatnak. A tartalom kizárólag oktatási célt szolgál, ezért saját felelősségre használd, és szükség esetén ellenőrizd más forrásokkal is.
✨ Kérdezd Larát — a tanulási partnered
Fedezd fel a személyre szabott tanulási támogatást. Lara elmagyarázza az anyagot, összefoglalja a témákat és megválaszolja a kérdéseidet — az Go csomagtól elérhető.
Lara segít gyorsabban tanulni — kizárólag a ReadyTools Go, Plus és Max tagoknak.


