- Back to Home »
- python - passing one function to another function
Posted by : ANIL KUMAR MULA
Friday, 2 January 2015

#passing function to a function
def do(x,y):
# this function is to check if first argument is greater than second
if x > y:
return [True,x,y]
else:
return [False]
def sub(func):
lis = func
#lis = [False]
#lis = [True,3,2]
if lis[0] == True:
return lis[1] - lis[2]
else:
return "sub not possible"
print((sub(do(2,3)))) # none
print((sub(do(3,2)))) # 1
I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
ReplyDeletePython Training in Bangalore
Casino Secret 100% Free Spins + No Deposit Bonus Code
ReplyDeleteCasino Secret 인카지노 100% Free カジノ シークレット Spins + No Deposit Bonus Code The secret 100% free casino bonus code is 100% match up to matchpoint a new player on the first deposit.
smm panel
ReplyDeletesmm panel
iş ilanları
İnstagram Takipçi Satın Al
HIRDAVAT
HTTPS://WWW.BEYAZESYATEKNİKSERVİSİ.COM.TR/
Servis
tiktok jeton hilesi