+ 2
def stands for ?
12 RĂ©ponses
+ 6
define for defining user defined function
+ 3
def, a keyword of the Python , is used to declare a function
+ 2
def stands for define
as here we are defining a function which we can use by our own later which would help us in a lot .
+ 2
defining function
+ 2
defines a function or meathod
+ 1
Short of define.
+ 1
Def means defining a function.
0
we can use def to create our own function s
0
def is not to define a variable but in Python, it is used to define a user definable custom function.
for instance, if I write a code
def square(num):
return x * x
the above def is defining a new function called 'square' which will take a local argument 'x' when called and the. returns its square .
To use that function, we need to call it . The method is as follows.
y = square(7)
print y
Then the output will be
49.
0
definition of function....in python 1st you need to define the function with def keyword and then at down call the function for execution...
- 2
defining a variable
- 2
def = define the variable