lundi 8 juillet 2019

How can I add a string to another in a specific place?

I had some difficulty solving this challenge :

For each word in words, add ‘d’ to the end of the word if the word ends in “e” to make it past tense. Otherwise, add ‘ed’ to make it past tense. Save these past tense words to a list called past_tense.

words = ["adopt", "bake", "beam", "confide", "grill", "plant", "time", "wave", "wish"]

Aucun commentaire:

Enregistrer un commentaire