以下程序的输出结果是( )?letter = ['A','B', 'C', 'D', 'D']for i in letter: if i == 'D': letter.remove(i)print(letter)
A: ['A','B', 'C', 'D']
B: ['A','B', 'C', 'D','D']
C: ['A','B', 'C', 'D','D','D']
D: ['A','B', 'C']
A: ['A','B', 'C', 'D']
B: ['A','B', 'C', 'D','D']
C: ['A','B', 'C', 'D','D','D']
D: ['A','B', 'C']
举一反三
- 下面代码的输出结果是__________。letter=['A','B','C','D','D','D']foriinletter:ifi=='D':letter.remove(i)print(letter) A: ['A','B','C'] B: ['A','B','C','D','D'] C: ['A','B','C','D','D','D'] D: ['A','B','C','D']
- 以下代码运行结果为:( )for letter in ' Happy': if letter == ' a': break print ('当前字母:',letter) A: H B: a C: p D: y
- I wrote a letter,___ I forgot to mail it A: an d B: bu t C: or D: while
- I received the letter _______ I had been expecting. A: / B: who C: for D: how
- I read the letter ______ was on your desk. A: what B: that C: where D: and