This Python Strings Quiz helps beginners and developers sharpen their skills in string creation, manipulation, slicing, and built-in functions. From indexing to immutability, this quiz covers all essential string operations in Python.
Time limit: 0
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
What does the len() function return for the string “Hello World”?
Correct
Incorrect
Question 5 of 15
5. Question
What will be the output of the following code?
s = “Python” print(s[-1])
Correct
Incorrect
Question 6 of 15
6. Question
What is the result of “abc” + “123”?
Correct
Incorrect
Question 7 of 15
7. Question
Which method converts all characters of a string to uppercase?
Correct
Incorrect
Question 8 of 15
8. Question
What will the following code print?
s = “DataFlair” print(s[1:5])
Correct
Incorrect
Question 9 of 15
9. Question
Which method returns the index of the first occurrence of a substring?
Correct
Incorrect
Question 10 of 15
10. Question
What is the output of this code?
s = “Welcome” print(s*2)
Correct
Incorrect
Question 11 of 15
11. Question
What does s.strip() do in Python?
Correct
Incorrect
Question 12 of 15
12. Question
Which operator is used for string membership test?
Correct
Incorrect
Question 13 of 15
13. Question
What will print(“hello”.capitalize()) output?
Correct
Incorrect
Question 14 of 15
14. Question
What does s.isdigit() return for the string “123a”?
Correct
Incorrect
Question 15 of 15
15. Question
What will be the output of this code?
s = “Python” print(“Py” in s)
Correct
Incorrect
Summary
These MCQs help you evaluate your understanding of Python string operations like indexing, slicing, built-in methods, and immutability. Ideal for beginners and intermediate learners preparing for coding interviews or Python certification.
At QuizOrbit, our team specializes in fun, informative quizzes across topics like general knowledge, technology, and entertainment. Boost your knowledge with our expert-designed quizzes.