>>> def square(x): ... 'calculates the square of the number x.' ... return x*x ... >>> square.__doc__ 'calculates the square of the number x.' >>> help(square) Help on function square in module __main__: square(x) calculates the square of the number x.
python define function
猜你喜欢
转载自www.cnblogs.com/lianghong881018/p/11080772.html
今日推荐
周排行