注意:此页面搜索的是所有试题
题目内容
(国家开放大学Python程序设计)
以下代码的运行结果为( )。
b1 = [1,2,3]
b2 = [2,3,4]
b3 = [x for x in b1 if x in b2]
print (b3)
A.[1,2,3,4]
B.[2]
C.[2,3]
D.程序报错
b1 = [1,2,3]
b2 = [2,3,4]
b3 = [x for x in b1 if x in b2]
print (b3)
A.[1,2,3,4]
B.[2]
C.[2,3]
D.程序报错
参考答案