0

what are keyword arguments for functions?

eg.key=len is for max() function

1st Dec 2020, 2:32 PM
Vedang Kawalkar
4 Respostas
+ 5
Its for defining the criteria to sort out max value from given data. When you use len as a argument, you are declaring that max function should sort the data according to length of data
1st Dec 2020, 2:50 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
1st Dec 2020, 2:38 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
Have a look at this for more clear view https://code.sololearn.com/ckEAWkJ8wahh/?ref=app
1st Dec 2020, 2:53 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
keyword arguments are usually used with dictionaries. As in: args = {"key": <length>, "name_list": <list_of_names>, ...}
1st Dec 2020, 2:36 PM
Slick
Slick - avatar