+ 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?
2 Respuestas
+ 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
+ 1
Hi, thank you very much for your attention! i have already got it