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
Wir haben die Materialien überprüft, dennoch können Fehler vorkommen. Der Inhalt dient ausschließlich Bildungszwecken, daher verwende ihn auf eigene Verantwortung und überprüfe ihn bei Bedarf mit anderen Quellen.
✨ Frag Lara — deine KI-Lernpartnerin
Entsperre personalisierte Lernunterstützung. Lara kann Lektionen erklären, Themen zusammenfassen und deine Lernfragen beantworten — verfügbar ab dem Go-Tarif.
Lara hilft dir, schneller zu lernen — exklusiv für ReadyTools Go-, Plus- und Max-Mitglieder.

