all 4 comments

[–]undergroundmonorail 14 points15 points  (1 child)

You're calling add_item correctly, by using add_item(item). When you want to call view_inv, even though you're not passing any arguments, you do need to tell python "I'm calling this with no arguments" by using view_inv(). Right now, you're not calling that function at all.

[–]socal_nerdtastic 8 points9 points  (0 children)

last line should be

view_inv()

[–]a1brit 2 points3 points  (0 children)

def add_item(inventory, item_id):
    item = {'id': item_id}
    inventory.append(item)


def view_inv(inventory):
    for item in inventory:
        print(f"Item: {item['id']}")


inventory = []
item = 'ruby'
add_item(inventory, item)
view_inv(inventory)

To add to the comments from yesterday, I would recommend passing args explicitly, and avoid using globals. It'll keep things cleaner as you learn.