我想基于正则表达式过滤列表中的字符串.
还有比这更好的东西[x for x in list if r.match(x)]吗?
[x for x in list if r.match(x)]
python regex
python ×1
regex ×1