python正则表达式,split怎么有这么多None?
4 回答
精慕HU
TA贡献1845条经验 获得超8个赞
i = 0; i < tmp.length; i++) {
if (tmp[i].indexOf("]") != -1) {
HashMap<String, String> tb = new HashMap<String, String>();
tb.put("list", tmp[i]);
aap.add(tb);
}
}
SpecialAdapter sa = new SpecialAdapter(this, aap, R.layout.listcontent,
new String[] { "list" }, new int[
慕姐4208626
TA贡献1852条经验 获得超7个赞
s = 'Hello!This?Is!What?I!Want'
for i in ('!', '?'):
s = s.replace(i,' ')
list1 = s.split()
list1 = [i for i in list1 if i]
添加回答
举报
0/150
提交
取消