Edit Functions and Higher order functions

This commit is contained in:
Odion Sonny-Egbeahie 2022-06-26 19:24:10 +01:00
parent ff24ab221f
commit b24a8ffdf0
2 changed files with 2 additions and 2 deletions

View File

@ -404,7 +404,7 @@ print(reverse_list1(["A", "B", "C"]))
food_staff = ['Potato', 'Tomato', 'Mango', 'Milk'];
print(add_item(food_staff, 'Meat')) # ['Potato', 'Tomato', 'Mango', 'Milk','Meat'];
numbers = [2, 3, 7, 9];
print(add_item(numbers, 5)) [2, 3, 7, 9, 5]
print(add_item(numbers, 5)) # [2, 3, 7, 9, 5]
```
12. Declare a function named remove_item. It takes a list and an item parameters. It returns a list with the item removed from it.

View File

@ -201,7 +201,7 @@ def decorator_with_parameters(function):
@decorator_with_parameters
def print_full_name(first_name, last_name, country):
print("I am {} {}. I love to teach.".format(
first_name, last_name, country))
first_name, last_name))
print_full_name("Asabeneh", "Yetayeh",'Finland')
```