Question: Write a function called mystrip ( chars , option ) to return a copy of string chars with leading and / or trailing whitespace removed.

Write a function called mystrip(chars, option) to return a copy of string chars with leading and/or trailing whitespace removed. The input argument option is a keyword (or keyworded) argument with a default value "both". When option = "left", remove the leading whitespace; when option = "right", remove the trailing whitespace; when option = "both", remove both leading and trailing whitespaces. (Python built-in functions are allowed. Define the function only without calling it.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!