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. str = " Hello World! " #Type your answer here. str = print(str) Hint 1 .strip() method will strip specified character(s) from the string it’s applied to. Solution str = str.strip(" ")