python應(yīng)用操作——一行代碼計(jì)算任何數(shù)的階乘
提問(wèn)人:ylm發(fā)布時(shí)間:2020-09-29
ython3環(huán)境:
In [75]: import functools
In [76]: result = ( lambda k : functools.reduce(int.__mul__,range(1,k+1),1))(3)
In [77]: result
Out[77]: 6
繼續(xù)查找其他問(wèn)題的答案?
相關(guān)視頻回答
點(diǎn)擊加載更多評(píng)論>>