Skip to content

Instantly share code, notes, and snippets.

@kazazakifire
Created May 24, 2020 23:41
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 kazazakifire/a9b3f1f8fc525011a24a566d2df346df to your computer and use it in GitHub Desktop.
Save kazazakifire/a9b3f1f8fc525011a24a566d2df346df to your computer and use it in GitHub Desktop.
Spaced out - Turns spaces to underscores
userInput = input('Enter a sentence: ')
output = ''
for c in userInput:
if c==' ':
output = output + '_'
continue
output = output + c
print(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment