about | help | code help+videos | done | prefs |
Write a function that returns a copy of string s with all occurrences of substring old replaced by new. replace('The dog was walking and saw a fox and ran', 'an', 'bark') → 'The dog was walking barkd saw a fox barkd rbark' replace('The dog was walking and saw a fox and ran', 'and', 'x') → 'The dog was walking x saw a fox x ran' replace('eneenie', 'en', 'no') → 'noenoie' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy