#Author:xubojoy

names = ['lilei','hanmei']

names.append('zhangsan')
#直接删除
# names.remove('lilei')
#依下表删除的话两方式相同
# del names[0]  = names.pop(0)
#删除最后一个
# names.pop()

# names[1] = 'lisi'
#从1开始不包含2
# print(names[1:2])
# print(names[:2])
# print(names[1])
#从-1开始不包含-2
# print(names[-2:-1])
# print(names[-2:])
print(names)