Skip to content

Instantly share code, notes, and snippets.

@Alkz6
Created June 5, 2018 01:58
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 Alkz6/f0a87ddb34619cb4c61ba37421d1056c to your computer and use it in GitHub Desktop.
Save Alkz6/f0a87ddb34619cb4c61ba37421d1056c to your computer and use it in GitHub Desktop.
replacements ={
'wheels': ['horn', 'wipers', 'people'],
'round and round': ['beep, beep, beep', 'swish, swish, swish', 'go up and down']
}
original_verse = """The wheels on the bus go round and round,
round and round, round and round,
The wheels on the bus go round and round,
All day long.
"""
print(original_verse)
for no, original_value in enumerate(replacements.keys()):
print(original_verse.replace(original_value, replacements[original_value][no]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment