题型:单选题
下列代码的执行结果是?()
mylist=['Failure','is','the','mother','of','success'] for x in mylist[:]: if len(x)<=3: mylist.append(x) print(mylist)
| A. ['Failure','is','the','mother','of','success'] |
B. ['Failure','is','the','mother','of','success','of','is'] |
| C. ['Failure', 'is', 'the', 'mother', 'of', 'success', 'is', 'of'] |
D. ['Failure', 'is', 'the', 'mother', 'of', 'success', 'is', 'the', 'of'] |
更新时间:2023-04-06 12:50:27
|
【知识点】
电子学会Python二级
抱歉! 您未登录, 不能查看答案和解析点击登录
相似题推荐
单选题
已知列表s = ["a","b","c"],想要在列表开头插入元素 "z",正确语句是?( )
| A. s.insert (0,"z") |
B. s.insert (1,"z") |
| C. s.insert (2,"z") |
D. s.insert (3,"z") |
2026-07-25
单选题
林辰有一个存储歌曲名的列表song。最近他用听歌识曲识别到一首新歌《快乐小马》,想将其添加到列表末尾,下列哪个语句可以实现?( )
| A. song.insert('《快乐小马》') |
B. song.append('《快乐小马》') |
| C. song.insert(《快乐小马》) |
D. song.append(《快乐小马》) |
2026-07-25
