已知A和B为集合类型,下面哪个表达式结果为False?
A.union(B)==(A^B)|(A&B)
B. (A-B)|(B-A)==A^B
C. A-B==(A|B)-B
D. (A-B)|(B-A)==A&B
已知ls=[1,["good",3],3,4,5,6],下面哪个选项代码执行后ls[2][0][1]为'e'?
A. ls[0:1]=[2,["bet",26]]
B. ls[0:5:2]=["bit",["hello",8],22]
C. ls.insert(1,["bet","list"])
D. ls.append(["he","how"])
已知ls=[1,2,3],下面哪个选项代码执行后可以使ls保存[1,"bit",[2,"how"]]?
A. ls[1:2]=["bit",[2,"how"]]
B. ls.remove(2)ls.append([2,"how"])ls.remove(3)ls.append("bit")
C. lt=lslt=[1,"bit",[2,"how"]]
D. lt=lslt[1:3]=["bit",[2,"how"]]
已知dic为字典类型,下面哪个遍历循环结构可以使循环变量遍历dic中所有的键值对?
A. for k in dic:<语句块>
B. for k in dic.keys():<语句块>
C. for k,v in dic.items():<语句块>
D. for v in dic.values():<语句块>