In [96]: help()
Welcome to Python 3.8's help utility!
If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".
To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics". Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".
help> list
help> tuple
help> tuple.count
help> list.extend
跳转到如下:
可以看到list对象的extend方法可以实现向list追加可以迭代的对象以扩展原list。传入的参数一个是list自身,另一个是一个可迭代的对象。
Help on method_descriptor in list:
list.extend = extend(self, iterable, /)
Extend list by appending elements from the iterable.
(END)
按ESC,q退出查看界面
记得下方给我点赞支持哦👍👍👍
关注微信公众号“数据分析师之家”
数据分析之家联合JEE RAY品牌为粉丝派发福利
添加粉丝福利派发官,领取粉丝福利哦