Default parameter of a function is 'global' : Function Default Argument : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Function Default Argument »

 

Default parameter of a function is 'global'


Default parameter of a function is 'global'


def f(x, y=[]):
    y.append(x)
    return y

print f(23)                


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Buildin Function
» Function Default Argument