Mahtavaa!
Completion arvosana parantunut arvoon 4.35Osio 1. Luku 3
single
Accessing String Elements
Pyyhkäise näyttääksesi valikon
Now we know how we can create a string: both single and multiline. Now we need to learn how can we access certain elements in the string.
Elements in a string can be accessed by using indices. The very first index is 0, not 1. Therefore, if a string has 10 elements, the very last index will be 9.
Tehtävä
Swipe to start coding
Given variable course with the string String Manipulation in Python. Your tasks are:
- Extract the element with index 7.
- Extract the 12th element.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 3
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme