Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Slicing with Index Function | Section
Working with Numbers in Python: Integers, Floats, and Type Conversion - 1769704232138
Seksjon 1. Kapittel 23
single

single

Challenge: Slicing with Index Function

Sveip for å vise menyen

Oppgave

Sveip for å begynne å kode

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.

  1. Extract the word painful.
  2. Extract the word mistakes.
  3. Extract the word learn.

If you use all the methods that were explored, this task won't be challenging for you.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 23
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

some-alt