Python将字符串分割,间隔插入指定的字符
将字符串每2个字符分为一组,间隔的插入空格
import re
string = "aaaaaa270020110020ed810008f581000"
# 写出正则表达式 任意2个字符
pattern = re.compile('.{2}')
# findall是找到所有的字符,再在字符中添加空格,当然你想添加其他东西当然也可以
print(' '.join(pattern.findall(string)))

浙公网安备 33010602011771号