Blessing988

Untitled

Feb 21st, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def long_word_in_collection(a_list, a_string):
  2.     if a_string in a_list and len(a_string) > 4:
  3.         print(True)
  4.     else:
  5.         print(False)
  6.  
  7. words = ["cat", "dog", "rhino", "lion"] #a sample list
  8.  
  9. long_word_in_collection(words, "lion")
Advertisement
Add Comment
Please, Sign In to add comment