1 2 3 4 5 6 7
import re text = 'Python Exercises' def replace_spaces(text): text =text.replace (" ", "_") return (text) text =text.replace ("_", " ") return (text)