方法 1 : filter方法filter(None, ls)方法2 : 枚举while '' in ls: ls.remove('')方法3 : 列表推导式ls= [x for x in ls if x != '']