How to Check if a Python String Contains a Substring Quiz

Interactive Quiz ⋅ 16 Questions
By Martin Breuss

Now that you’ve learned how to check if a string contains a substring, it’s time to test your knowledge with this quiz!

Python
>>> "knowledge" in "brain"
False

Don’t worry, you’ll do better than that! Prove that pesky code block wrong and dive into answering the following quiz questions.

If you get a question wrong, then go back into the associated part of the tutorial and refresh your memory. Making mistakes is a great way to learn!

The quiz contains 16 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!

« Browse All Python Quizzes