Created
February 22, 2020 19:57
-
-
Save mayankdawar/3e2c783871c35ef04d58d5d32394dc3f to your computer and use it in GitHub Desktop.
For each string in wrds, add ‘ed’ to the end of the word (to make the word past tense). Save these past tense words to a list called past_wrds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wrds = ["end", 'work', "play", "start", "walk", "look", "open", "rain", "learn", "clean"] | |
| lst = [] | |
| for i in wrds: | |
| i = i + "ed" | |
| lst.append(i) | |
| past_wrds = lst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For each word in the list verbs, add an -ing ending. Save this new list in a new list, ing
verbs = ["kayak", "cry", "walk", "eat", "drink", "fly"]
accum =[]
for ing in verbs:
x= ing + "ing"
accum.append(x)
print(accum)