Run indexing, slice, and reverse
1s = "Kodin"
2print(s[0]) # first char
3print(s[1:4]) # slice
4print(s[::-1]) # reverse
Output:
Foundation lesson for Strings. Read the diagram, then check yourself with the quiz.
You can index, slice, and loop characters like a list of letters — but a string is immutable.
Foundation lesson for Strings. Read the diagram, then check yourself with the quiz.
Study the diagram, answer the topic quiz, then open Practice problems in the editor.
Answer all questions, then click Check answers. Use this before Practice in the editor.
Q1. Are Python strings mutable?
Q2. What does s[::-1] do?
Q3. Which counts vowels best?
Q4. f-strings help with…