You can also append or delete items of a list inside a function just as if you were manipulating the list outside a function.
my_list = [1, 2, 3] my_list.append(4) print my_list # prints [1, 2, 3, 4]
The example above is just a reminder of how to append items to a list.
Define a function called
list_extender that has one parameter
Inside the function, append the number
Then return the modified list.