小编use*_*698的帖子

提取字符串中的%出现次数

我有str格式的输出

    Port      Name        Intvl   In Mbps      %  In Kpps  Out Mbps      % Out Kpps
    Et7/1                  5:00     338.2   3.4%       31       0.0   12.3%        121
Run Code Online (Sandbox Code Playgroud)

我需要确定所有百分比,即3.412.3.做同样事情的最pythonic方法是什么

find_all with % just给出了索引,有没有更好的方法来实现呢?

python regex

1
推荐指数
1
解决办法
41
查看次数

标签 统计

python ×1

regex ×1