Python Debugging Exercises

Let’s check out some exercises that will help understand Debugging better.

Exercise 6-a

Use strip method to strip the whitespaces on both sides of the string.

.strip() method will strip specified character(s) from the string it’s applied to.

str = str.strip(" ")

Need More Exercises?

Check out Holy Python AI+ for amazing Python learning tools.

*Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.
Umut Sagir
Finance & Data Science Professional,
Founder of HolyPython