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

 

david.white@denison.edu cs112fall2015 > nospaces
prev  |  next  |  chance

Write a function nospaces(sentence) that uses the replace string method to return a version of the string sentence in which all the spaces have been replaced by the underscore (_) character.


nospaces('word') → 'word'
nospaces('A string with Spaces') → 'A_string_with_Spaces'
nospaces('some symbols like $,%,& look pretty') → 'some_symbols_like_$,%,&_look_pretty'

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

def nospaces(sentence):

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