Test your knowlege about string

Python String Quiz

Python String Quiz (15 MCQs)

1. Which of the following is a valid string in Python?
2. What is the output of len("Python")?
3. What will "Hi" * 3 return?
4. Strings in Python are:
5. What will "Python".lower() output?
6. Which operator is used for concatenation?
7. What does "Hello".find("e") return?
8. Which of the following checks if substring exists?
9. What will "Python Programming".split() return?
10. Which function removes spaces?
11. What will "Python".replace("Py","My") return?
12. What is the output of "Python".count("o")?
13. What does "python".capitalize() return?
14. What is the index of 'o' in "Hello"?
15. Which function converts string to uppercase?

Comments

Post a Comment

Popular posts from this blog

Topic1 :- What is Python Programming?

Topic2: -Why Python?

Topic7: What is Numpy?