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
Hemos revisado y comprobado los materiales, pero aún pueden existir errores. El contenido se ofrece únicamente con fines educativos, así que úsalo bajo tu propia responsabilidad y verifica con otras fuentes si es necesario.
✨ Pregunta a Lara — tu compañera de estudio con IA
Desbloquea soporte de aprendizaje personalizado. Lara puede explicar lecciones, resumir temas y responder tus preguntas — disponible desde el plan Go y superiores.
Lara te ayuda a aprender más rápido — exclusivo para los miembros ReadyTools Go, Plus y Max.


