I was looking at this code from this module: https://www.codecademy.com/courses/learn-python-3/lessons/learn-python-function-arguments/exercises/keyword-argument-unpacking
from products import create_product
# Update create_products() to take arbitrary keyword arguments
def create_products(**products_dict):
for name, price in products_dict.items():
create_product(name, price)
# Checkpoint 3
# Update the call to `create_products()` to pass in this dictionary as a series of keywor
create_products(Baseball=3,Shirt=14,Guitar=70)
But this can be easily recreated like this:
from products import create_product
# Update create_products() to take arbitrary keyword arguments
def create_products(*products_list):
for lists in products_list:
for list in lists:
create_product(list[0], list[-1])
# Checkpoint 3
# Update the call to `create_products()` to pass in this dictionary as a series of keywords
create_products([['Baseball',3],['Shirt',14],['Guitar',70]])