Functions with many parameters are hard to call correctly — which order do the args go?
# dirty — 5 positional arguments
def solve(first_name, last_name, age, email, role):
return {'first_name': first_name, 'last_name': last_name, 'age': age, 'email': email, 'role': role}Refactor so solve accepts a single options dict instead of 5 positional arguments.
solve({'first_name': 'Alice', 'last_name': 'Smith', 'age': 30, 'email': 'a@b.com', 'role': 'admin'})
Sample tests