Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def right_words(list1,number):
- x = [] #create and empty list
- for i in list1: #loop through the elements in list1
- if len(i) == number: #if the length of any of the elements in list1 is 3
- x.append(i) #add the object to a new list
- print(x) #print x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement