Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Slicing with Index Function | Strings
Data Types in Python
course content

Course Content

Data Types in Python

Data Types in Python

1. Getting Familiar With Numbers in Python
2. True or False?
3. Strings
4. Bring All the Topics Together

bookChallenge: Slicing with Index Function

Task

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; the length is 7.
  2. Extract the word mistakes; the length is 8.
  3. Extract the word learn; the length is 5.

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 11
toggle bottom row

bookChallenge: Slicing with Index Function

Task

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; the length is 7.
  2. Extract the word mistakes; the length is 8.
  3. Extract the word learn; the length is 5.

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 11
toggle bottom row

bookChallenge: Slicing with Index Function

Task

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; the length is 7.
  2. Extract the word mistakes; the length is 8.
  3. Extract the word learn; the length is 5.

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

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; the length is 7.
  2. Extract the word mistakes; the length is 8.
  3. Extract the word learn; the length is 5.

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 3. Chapter 11
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt