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
Complete the below code to split string2 into separate sentences based on full stop.


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.

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())

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

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *