小白教程
所有教程
关于
Search
172.69.58.68
172.69.58.68
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 att list append”的源代码
本页内容
上一节:
Python3_att_list_min
下一节:
Python3_att_list_count
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:list.append(obj)}}[[Category:python3 list|5]] = Python3 List append()方法 = [[python3 list|Python3 列表]] == 描述 == append() 方法用于在列表末尾添加新的对象。 == 语法 == append()方法语法: <sample title="" desc="" lang="python" hererun="1"> list.append(obj) </sample> == 参数 == * obj -- 添加到列表末尾的对象。 == 返回值 == 该方法无返回值,但是会修改原来的列表。 以下实例展示了 append()函数的使用方法: <sample title="" desc="" lang="python" hererun="1"> #!/usr/bin/python3 list1 = ['Google', 'xiaoBai', 'Taobao'] list1.append('Baidu') print ("更新后的列表 : ", list1) </sample> 以上实例输出结果如下: <sample title="" desc="" lang="python" hererun="1"> 更新后的列表 : ['Google', 'xiaoBai', 'Taobao', 'Baidu'] </sample> [[python3 list|Python3 列表]]
返回至“
Python3 att list append
”。
上一节:
Python3_att_list_min
下一节:
Python3_att_list_count