Python Memory Management

Python Quiz for String – 01

Python Quiz for String

Strings are sequences of characters, used to represent text-based data in Python. From simple data storage to complex operations like pattern matching, string manipulation forms the backbone of many programming tasks. Whether you’re a beginner wanting to solidify your understanding or an intermediate programmer aiming to brush up on your skills, this Python quiz for string is designed to challenge and enhance your knowledge. Dive in and test your grasp of Python strings, their methods, properties, and intricacies!

0%
12

Python String – 01

Level: Beginner

1 / 10

1. Which method is used to check if a string starts with a certain prefix?

2 / 10

2. What does the swapcase() method do?

3 / 10

3. What does the count() method do?

4 / 10

4. Which method checks if a string is in lowercase?

5 / 10

5. What is the output of “HELLO”.casefold()?

6 / 10

6. Which method checks if all the characters in a string are alphabetic?

7 / 10

7. What is the output of “hello”.rjust(10)?

8 / 10

8. What does the title() method do?

9 / 10

9. Which method removes trailing whitespaces?

10 / 10

10. Which method returns a string with all characters in lowercase?

Your score is

0%