0
What are arguments
It's a silly question but i really need an answer
4 Respostas
+ 4
A Python function argument is a value you pass by assignment to a function parameter under a function call. The parameter become a local variable inside the function:
def f(x): return x ** 2 # Here x is a parameter in the function head.
res = f(10) # Here the value 10 becomes the argument to the function, and is assigned to the parameter x (like x = 10). Now the passed argument can be used inside the functions body, so x ** 2 will become 10 ** 2.
Sometime even the parameter above is called argument.
+ 1
Hayam Mohammed , The explanation given by Per Bratthammar applies to other languages as well
0
Ok, you've said "python function argument"
Is it (the argument) in python differ from the other languages?
Per Bratthammar
0
Per Bratthammar
Oh got it
Thanks alot