Checkpoint 8.9.1.
Create a new list of the 6th through 13th elements of
lst
(eight items in all) and assign it to the variable output
.split
method breaks a string into a list of words. By default, any number of whitespace characters is considered a word boundary.ai
as the delimiter:split
method is join
. You choose a desired separator string, (often called the glue) and join the list with the glue between each of the elements.wds
in this example) is not modified. Also, you can use empty glue or multi-character strings as glue.lst
(eight items in all) and assign it to the variable output
.output
and assign to it a list whose elements are the words in the string str1
.