Question: BlockPy: Review 2) String Cleaning Define a function clean_string that consumes a string and returns a new, cleaned string. To clean a string, you will

 BlockPy: Review 2) String Cleaning Define a function clean_string that consumes

BlockPy: Review 2) String Cleaning Define a function clean_string that consumes a string and returns a new, cleaned string. To clean a string, you will need to: . Strip whitespace from the end Replace any plus signs with spaces So, for example, the string " Hello+World " would become "Hello World" Note: Your function will be unit tested against multiple strings. It is not enough to get the right output for your own test cases, you will need to be able to handle any kind of non-empty string

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!