Udfordring: Udskæring med Indeksfunktion
Swipe to start coding
Try to extract words using slicing, but in a little bit more complicated way. The syntax of slicing is the following:
word[start_index:end_index]
To find the start_index, use the index() method, and to find the end_index, use the index() method, and add the length of the word.
- Extract the word
painful. - Extract the word
mistakes. - Extract the word
learn.
If you use all the methods that were explored, this task won't be challenging for you.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give an example?
Fantastisk!
Completion rate forbedret til 3.45
Udfordring: Udskæring med Indeksfunktion
Stryg for at vise menuen
Swipe to start coding
Try to extract words using slicing, but in a little bit more complicated way. The syntax of slicing is the following:
word[start_index:end_index]
To find the start_index, use the index() method, and to find the end_index, use the index() method, and add the length of the word.
- Extract the word
painful. - Extract the word
mistakes. - Extract the word
learn.
If you use all the methods that were explored, this task won't be challenging for you.
Løsning
Tak for dine kommentarer!
single