Guest User

Untitled

a guest
Apr 26th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. verse = """
  2. The wheels on the bus go round and round,
  3. round and round, round and round,
  4. The wheels on the bus go round and round,
  5. All day long.
  6. """
  7. #words_of_verse = verse.split(' ') #Convert string to list
  8.  
  9. words_of_verses = verse #Create duplicate string
  10.  
  11. print(verse)
  12.  
  13. nouns = ['wheels','horns', 'wipers', 'people']
  14. verbs = ['round and round','beep, beep, beep', 'swish, swish, swish', 'up and down']
  15.  
  16. for i in range (0,len(nouns)):
  17.  
  18. words_of_verses = words_of_verses.replace(nouns[i],nouns[i+1])
  19. print('i = ' + str(i))
  20. eachword = words_of_verses[i]
  21. print('eachword =' + words_of_verses[i])
  22. words_of_verses = words_of_verses.replace(verbs[i],verbs[i+1]) #Choose one name from list
  23. print(words_of_verses, '\n')
Add Comment
Please, Sign In to add comment