Solution 1

def append_to_list(hungry_list, data):
    return hungry_list

Append to list

The append_to_list functions receives two parameters, hungry_list and data. Its job is to append the data passed to the hungry_list. Examples:

a_list = ['pizza', 'bacon']
modified_list = append_to_list(a_list, 'hamburger')

print(modified_list)  # ['pizza', 'bacon', 'hamburger']

Don't forget to return the list!

Test Cases

test append empty list - Run Test

def test_append_empty_list():
    assert append_to_list([], "list food") == ["list food"]

test append bigger list - Run Test

def test_append_bigger_list():
    assert append_to_list(["pizza", "nachos"], "chips") == ["pizza", "nachos", "chips"]
def append_to_list(hungry_list, data): pass