tupledemo = (1,1,2,3,4,5,6,6) setnew = {x**2 for x in tupledemo if x%2==0} print(setnew) 以上代码的运行结果为?
A. {16, 4, 32}
B. {16, 36}
C. {16, 4, 36}
D. {16, 4}
dictdemo = {'1':1,'2':2,'3':3} setnew = {x for x in dictdemo.keys()} print(setnew) 以上代码的运行结果为?
A. {'2', '1'}
B. {'2', '1', '3'}
C. {'2', '3'}
D. {'1', '3'}
set1 = {x for x in range(10)} print(set1) 以上代码的运行结果为?
A. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
B. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10}
C. {1, 2, 3, 4, 5, 6, 7, 8, 9}
D. {1, 2, 3, 4, 5, 6, 7, 8, 9,10}
set1 = {x for x in range(10) if x%2==0} print(set1) 以上代码的运行结果为?
A. {0, 2, 4, 6}
B. {2, 4, 6, 8}
C. {0, 2, 4, 6, 8}
D. {4, 6, 8}