python里有没有类似substring()的函数,可以抽取字符串中索引值为m-n的子字符串~~

2025-02-25 07:38:43
推荐回答(1个)
回答1:

直接[from : to]就可以了
s="1234"
s[2:4]