Python Basic Quiz #6 – String Manipulation Level #2

Welcome to your Python Basic Quiz #6 - String Manipulation Level #2

The questions in this Quiz are based on the below strings.

string1 = "Once upon a time a girl named Cinderella lived with her stepmother and two stepsisters"
string2 = "Cinderella"

User Name
Email
1. 
We need to convert "string1" to a list of words using a built-in python function. Fill in the correct function below.

string1 = "Once upon a time, a princess named Snow White lived in a castle with her father."
list_words = string1.

2. 
Complete the below code to split string2 into separate sentences based on full stop.

string2.

3. 
Which function can be used to convert first letter of all words in a sentence to upper case?

4. 
Which function is best suitable to remove $ symbols from below string?

string3 = "$$$woods$$$$$"

5. 
In string1, we need to change the spaces between words to # symbols using split/join functions. Fill in the correct code below.

new_string = (string1.split())

Leave a Reply