Python Quiz #6 – String Manipulation Level #2

Python Short Quiz. 5 Questions. Difficulty Level: Easy to Moderate. Concept: Python String Manipulations. Built-in Functions.

Hello Everyone! Welcome to the Short Quiz on Python String manipulations.

This Quiz contains of 5 simple questions. After completing the Quiz, immediately you will get the results displayed with correct answers.

If you would like to learn more on the concept, you can find our tutorial page String Manipulation.

Please feel free to provide your feedback in the comments box in bottom of the page.

Happy Programming!

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. 
Which function can be used to convert first letter of all words in a sentence to upper case?

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

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

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

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

string2.

5. 
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.

Asha Ponraj
Asha Ponraj

Data science and Machine Learning enthusiast | Software Developer | Blog Writter

Articles: 84

Leave a Reply

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