请补充如下代码,listA中存放了已点的餐单,让Python帮你增加一个“红烧肉”,去掉一个“水煮干丝”。listA=['水煮干丝','平桥豆腐','白灼虾','香菇青菜','西红柿鸡蛋汤']listA.___①____("红烧肉")listA.____②____("水煮干丝")print(listA)
查看答案
请补充如下代码,求其各整数元素的和:ls = [123, "456", 789, "123", 456, "789"]s = 0for item in ls:if ___①_ _ == type(123):s += ___②_ _print(s)
请补充如下代码,在数字789后增加一个字符串"012"。ls=[123,"456",789,"123",456,"789"]___①___
请补充如下代码,使用remove()方法,采用一行语句,删除数字789ls=[123,"456",789,"123",456,"789"]___①__
请补充如下代码,将列表 ls 逆序打印ls = [123, "456", 789, "123", 456, "789"]___①___print(ls)