Apply String Methods (Exercise)
00:00
This exercise is called Apply String Methods, and your task is to use the same four strings from the previous exercise and then write a program that uses string methods to alter each string so that .startswith()
with the string "be"
returns True
for all of them.
00:16
So if you remember in the last exercise, you checked on the same strings, and the second one returned True
, but all of the other ones returned False
.
00:25
So now you should apply string methods on string1
, string3
, and string4
so that they also return True
when you call .startswith("be")
on them.
00:36
Give it a try. This is a little more involved. You can apply the string methods that you practiced earlier and make sure that you get four times True
as a result of .startswith("be")
in a row.
Become a Member to join the conversation.