亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

python內建函數?

python內建函數?

狐的傳說 2019-02-05 09:05:17
python內建函數
查看完整描述

3 回答

?
蕭十郎

TA貢獻1815條經驗 獲得超13個贊

使用dir(__builtins__)可以給出所有內建函數的list

你要使用哪個,打印該函數的__doc__即可知道其用法

比如
>>> dir(map)
['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__', '__str__']
>>> print map.__doc__
map(function, sequence[, sequence, ...]) -> list

Return a list of the results of applying the function to the items of
the argument sequence(s). If more than one sequence is given, the
function is called with an argument list consisting of the corresponding
item of each sequence, substituting None for missing values when not all
sequences have the same length. If the function is None, return a list of
the items of the sequence (or a list of tuples if more than one sequence).
>>>

至于你想要內建函數的詳細說明,我是不會給你的(我也沒有,呵呵)
但都在文檔里面

不知道為什么你們不先看看文檔再來問問題呢。。。


查看完整回答
反對 回復 2019-03-15
  • 3 回答
  • 0 關注
  • 711 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號