Reemplace el espacio con. pyhton

mystring.replace(" ", "_")
Goofy Goober