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(" ")