hcdy.net
当前位置:首页 >> lAmBDA iF EliF ElsE >>

lAmBDA iF EliF ElsE

def calc(s): """ def f_add(a,b): return a+b def f_mul(a,b): return a*b def f_sub(a,b): return a-b """ if s=='+': return lambda a,b:a+b #return f_add elif s=='*': return lambda a,b:a*b #return f_mul elif s=='-': return lambda a,...

网站首页 | 网站地图
All rights reserved Powered by www.hcdy.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com