H
H
Hukyl2020-07-06 18:07:34
Python
Hukyl, 2020-07-06 18:07:34

How to pass two lists as arguments to a function?

Tell me how to pass two lists to the function arguments (function below)

def get_values(dict_:dict, keys, alters):
    return [dict_.get(key, alter) for key, alter in zip(keys, alters)]


I have already tried to specify an asterisk before keys and values, and still I don’t understand how to do it

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question