Passing and Calling (Built-in) Functions : Parameter : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Parameter »

 

Passing and Calling (Built-in) Functions


def convert(func, seq):
    return [func(eachNumfor eachNum in seq]

myseq = (12345.67, -6.2e8999999999L)
print convert(int, myseq)
print convert(long, myseq)
print convert(float, myseq)



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Function
» Parameter