Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #empty list
  2. empty = []
  3. #active - Boolean
  4. active = [True]
  5. #list with 5 favourite number integers - integers
  6. favourite_numbers = [1,3,4,5,7]
  7. #colors - strings
  8. colors = ["red", "green", "blue"]
  9. '''is_long function returns True
  10. if list has more than 5 elements and
  11. False if otherwise'''
  12. def is_long(slist):
  13.     if len(slist) > 5:
  14.         return True
  15.     else:
  16.         return False
  17. is_long()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement