+ 1

What is the difference between working with key arguments and key parameters?

What is the difference between working with key arguments and key parameters in Python functions when there is no need to use the parameter with '*'? 1) key arguments: def func(x, key1, key2, ... , keyN): return x + key1, key2, ... , keyN 2) key parameters: def func(x, *, key1, key2, ... , keyN): return x + key1, key2, ... , keyN In both cases, we have a similar algorithm for entering and working with arguments and parameters in functions. So, is all the same?

16th Feb 2018, 3:55 AM
Yuri Revin
Yuri Revin - avatar
2 Réponses
+ 2
arguments are the functions you pass in method and parameters is a variable used to declare the functions so in key parameter the def functions are used to declare key . So , f(x)=x*x, here x is a parameter and a procedural definition
24th Jun 2018, 5:23 AM
Yuvraj Singh
Yuvraj Singh - avatar
+ 1
Hi, thank you very much for your attention! i have already got it
24th Jun 2018, 6:03 AM
Yuri Revin
Yuri Revin - avatar