Course Content
Data Types in Python
Data Types in Python
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
Everything was clear?
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
Everything was clear?
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏
Everything was clear?
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.
- Extract the word
painful
; the length is 7. - Extract the word
mistakes
; the length is 8. - 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.😏