Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.