Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What does the lower() method do?
Look at how 'HELLO' and 'hello' are different.
Explain what strip() accomplishes on a string.
Consider what happens when you have extra spaces.
What does the method lower() do?
Think about lower case letters.
True or False: The strip() method removes spaces from the middle of the string.
Consider where spaces are removed.
Create a function that takes a string with spaces, replaces all spaces with hyphens, and converts it to lowercase.
Think about using both replace and lower methods.
Write code to count how many times 'apple' appears in 'apple banana apple'.
What method counts occurrences of substrings?
6 more questions in this section. Enroll free to practise them all.
Enroll free