Python List append()方法
Python 教程
· 2019-02-02 21:13:48
描述
append() 方法用于在列表末尾添加新的对象。
语法
append()方法语法:
list.append(obj)
参数
- obj -- 添加到列表末尾的对象。
返回值
该方法无返回值,但是会修改原来的列表。
实例
以下实例展示了 append()函数的使用方法:
#!/usr/bin/python aList = [123, 'xyz', 'zara', 'abc']; aList.append( 2009 ); print "Updated List : ", aList;
以上实例输出结果如下:
Updated List : [123, 'xyz', 'zara', 'abc', 2009]
点击查看所有 Python 教程 文章: https://www.codercto.com/courses/l/8.html
HTML & XHTML
Chuck Musciano、Bill Kennedy / O'Reilly Media / 2006-10-27 / GBP 39.99
"...lucid, in-depth descriptions of the behavior of every HTML tag on every major browser and platform, plus enough dry humor to make the book a pleasure to read." --Edward Mendelson, PC Magazine "Whe......一起来看看 《HTML & XHTML》 这本书的介绍吧!
HEX CMYK 转换工具
HEX CMYK 互转工具
HSV CMYK 转换工具
HSV CMYK互换工具