Question: Write a function clean that when is given a string and returns the string with the leading and trailing space characters removed. Details: you

Write a function clean that when is given a string and returns the string with the leading and trailing space characters removed. Details: you must use while loop(s) you must not use the strip method the space characters are the space , newline ' ', and tab '\t' >>> clean(" 'hello' >>> clean (" hello, how are you? ") 'hello, how are you?' >>> clean (" \t what's up, doc? \t") hello ") "what's up, doc?" >>> clean(" \t what's up, doc? \t")=="what's up, doc?" True
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
You can create a clean function that removes leading and trailing spaces n... View full answer
Get step-by-step solutions from verified subject matter experts
