Advertisement
SPN_201130

right_words

Apr 1st, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def right_words (klo, kin):
  2.     newlist=[]
  3.     for word in klo:
  4.         if len(word) == kin:
  5.             newlist.append(word)
  6.     print(newlist)
  7.  
  8. right_words(['cat', 'cap', 'truth', 'talk'], 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement