Skip to content

Instantly share code, notes, and snippets.

@shubham769
Created April 28, 2020 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shubham769/e0e7ba7653d1b3b8fd833fc79b8108c0 to your computer and use it in GitHub Desktop.
Save shubham769/e0e7ba7653d1b3b8fd833fc79b8108c0 to your computer and use it in GitHub Desktop.
sample_text = "I want to remove spaces "
def remove_space(text):
text = text.strip()
text = text.split()
return " ".join(text)
remove_space(sample_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment