Parameters can also be passed as a tuple using the * syntax : Default Arguments : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Default Arguments »

 

Parameters can also be passed as a tuple using the * syntax


def fun(name, location, year=2006):
    print "%s/%s/%d" (name, location, year)

tuple = ("DaNae""Paris"2003)
fun(*tuple)



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Function
» Default Arguments