input: Write a python function to replace spaces with underscores in a string.
  assert replace_spaces('Hello World')=='Hello_World'
  assert replace_spaces('Replace all spaces')=='Replace_all_spaces'
  assert replace_spaces('NoSpacesHere')=='NoSpacesHere'
output: def replace_spaces(s: str) -> str:
      return s.replace(' ', '_')