Python学习小记(2)---[list, iterator, and, or, zip, dict.keys]
1.List行为可以用alist[:]相当于alist.copy(),可以创建一个alist的shallocopy,但是直接对alist[:]操作却会直接操作alist对象>>>alist=[1,2,3]>>>blist=alist[:]#assignalist[:]toblist>>>alist[1,2,3]>>>blist[1,2,3]>>>blist[2:]=['a','b','c']#al