python 列表对象方法
1 append方法 (列表末尾添加元素)
salary=[5250.0, 18000.0, 9500.0, 12500.0, 17500.0, '面议', 20000.0, 17500.0]
salary.append(20000)
结果为 [5250.0, 18000.0, 9500.0, 12500.0, 17500.0, '面议', 20000.0, 17500.0,20000]
2 count 方法(统计次数)
salary=[5250.0, 17500.0, 9500.0, 12500.0, 17500.0, '面议', 20000.0, 17500.0]
salary.count(17500)
结果为 3
3 extend方法 (列表末尾一次性添加一个或多个值)
这个方法和str1+str2类似
salary=[5250.0, 17500.0, 9500.0, 12500.0, 17500.0, '面议', 20000.0, 17500.0]
a=[12000,4000,