a guest Feb 21st, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #1. Create an empty list and assign it to the variable "empty"
- empty = 
- #2. Create a list with a single Boolean - True - and assign it to the variable "active"
- active = [True]
- #3. Create a list with 5 integers of your choice and assign it to the variable "favourite_numbers"
- favourite_number = [14, 5, 94, 60, 99]
- #4. Create a list with 3 strings - "red", "green", "blue" - and assign it to the variable "colors"
- colours = ["red", "green", "blue"]
- #5. Declare an is_long function that accepts a single list as an argument
- # It should return True if the list has more than 5 elements, and False otherwise
- def is_long(array):
- if len(array) > 5:
RAW Paste Data