编写程序,生成一个包含50个随机整数的列表,然后删除其中的所有奇数。(提示:从后面向前删除),请补充缺失处代码。import randomx = [random.randint(0,100) for i in range(50)]print(x)i = len(x) - 1while i>= 0:if x[i]%2 == 1:del x[i]i-=1print(x)
A. if x[i]%2 == 1;del x[i]
B. if x[i]%2 ==1:del x[i]
C. if x[i]%2 == 1:del x[i]
D. if x[i]%2 == 1:del x