我在python中有一个字符串.我想将它拆分maxsplit = 1为非常靠近字符串末尾的分隔符.
maxsplit = 1
例如
a = "abcdefghijklmnopqrstuvwxyz,1".
a.split(",", 1)在性能方面会更好a.rsplit(",",1)吗?
a.split(",", 1)
a.rsplit(",",1)
python string split
python ×1
split ×1
string ×1