id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu > removeOuterSpaces
prev  |  next  |  chance

Return a new string with all spaces on the left and right sides removed. This must remove all consecutive spaces on each end. (Note: coding bat does not display consecutive spaces properly, make sure it works on multiple spaces on the outside and inside!)


removeOuterSpaces(' hey ') → 'hey'
removeOuterSpaces(' x x ') → 'x x'
removeOuterSpaces(' ') → ''

...Save, Compile, Run (ctrl-enter)

def removeOuterSpaces(s):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy