字符串split后删除空串

lst = [x for x in str.split(' ') if x]
posted @ 2022-08-12 13:43  小柴i  阅读(143)  评论(0编辑  收藏  举报