Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Utmaning: Skivning med Indexfunktion | Strängar
Datatyper i Python

bookUtmaning: Skivning med Indexfunktion

Uppgift

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.

  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

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 11
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookUtmaning: Skivning med Indexfunktion

Svep för att visa menyn

Uppgift

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.

  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 desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 11
single

single

some-alt