1 list = ['a', 'b', 'c', 'd']
2 print list[1:-1] ## ['b', 'c']
3 list[0:2] = 'z' ## replace ['a', 'b'] with ['z']
4 print list ## ['z', 'c', 'd']
1List=[1,'a',"hello"]
2List.append(True)
3print(List)
4# output: [1, 'a', 'hello', True]
5