print('\n\n{:*^65}\n'.format('List'))  s=[1,2,True,'a','a',3+2j] t=[10,9,8,15]  print('s=',s) print('t=',t)  print("'a'在s中吗？",'a' in s)  print('2不在s中吗？','2' not in s)  print('s+t=',s+t)  print('2*s=',2*t)  print('访问s中的元素：',s[1],s[1:3],s[0:6:2])  print('s的长度：',len(s))  print('t的最大值：',max(t))  print('t的最小值：',min(t))  print('3+2j在s的哪个位置？',s.index(3+2j))  t1=t.copy() t1.sort() print('t1=t.copy()=',t1) print('对t1从小到大排序', t1) t1.sort(reverse=True) print('对t1从大到小排序', t1)  print("s中有多少个1？多少个'a'?",s.count(1),s.count('a')) #为什么?  try:     print(s.index('2')) except Exception as e:     print(type(e),e)  try:     print(max(s)) except Exception as e:     print(type(e),e)  m=[t,t,[1,2,3],[]] print('m=',m)  t[0]=11 print('t=',t) print('m=',m)  #为什么？  n=[[]]*3 print('n=',n)   n[0].append(3) print('n=',n)  #为什么？  x,y,z,u=t  a=3 b=[4] s=[a,b] print('s=',s,'a=',a,'b=',b) print('id(s[0])=',id(s[0]),'id(a)=',id(a)) print('id(s[1])=',id(s[1]),'id(a)=',id(b)) s[0]=1 s[1]=[6] print('s=',s,'a=',a,'b=',b) print('id(s[0])=',id(s[0]),'id(a)=',id(a)) print('id(s[1])=',id(s[1]),'id(a)=',id(b))  # mark for seperation print('\n\n{:*^65}\n'.format('Tuple'))  s=(1,2,3) print('s=',s,'s[0]=',s[0],'s[1]=',s[1]) print('list(s)=',list(s)) x,y,z=s print('x=',x,'y=',y,'z=',z)  try:     print(s.append(4)) except Exception as e:     print(type(e),e)  try:     s[0]=4 except Exception as e:     print(type(e),e)  try:     s.copy() except Exception as e:     print(type(e),e)  try:     s.reverse() except Exception as e:     print(type(e),e)  # mark for seperation print('\n\n{:*^65}\n'.format('Range'))  s=range(5) print('range(5)=',s) print('range(1,5)=',range(1,5)) print('list(range(1,5))=',list(range(1,5))) print('range(1,10,2)=',range(1,10,2)) print('tuple(range(1,5))=',tuple(range(1,10,2))) print('range(10,1,-2)=',range(10,1,-2)) print('list(range(10,1,-2))=',list(range(10,1,-2))) print('s=',s) print('list(s)=',list(s)) print('tuple(s)=',tuple(s))