## 1、find(sub[, start[, end]])

​找到，则返回最左端的索引值，未找到，则返回```-1 ````start``end`都可省略，省略`start`说明从字符串开头找

```source_str = "There is a string accessing example"
print(source_str.find("r"))
>>> 3

```

## 2、count(sub, start, end)

```source_str = "There is a string accessing example"
print(source_str.count("e"))
>>> 5

```

## 3、replace(old, new, count)

`old`代表需要替换的字符，`new`代表将要替代的字符，`count`代表替换的次数(省略则表示全部替换)

```source_str = "There is a string accessing example"
print(source_str.replace("i", "I", 1))
>>> There Is a string accessing example # 把小写的i替换成了大写的I

```

## 4、split(sep, maxsplit)

`sep`为分隔符切片，如果`maxsplit`有指定值，则仅分割`maxsplit`个字符串

```source_str = "There is a string accessing example"
print(source_str.split(" ", 3))
>>> ["There", "is", "a", "string accessing example"] # 这里指定maxsplit=3，代表只分割前3个

```

## 5、startswith(prefix, start, end)

```source_str = "There is a string accessing example"
print(source_str.startswith("There", 0, 9))
>>> True

```

## 6、endswith(suffix, start, end)

```source_str = "There is a string accessing example"
print(source_str.endswith("example"))
>>> True

```

## 9、join

```list1 = ["ab", "cd", "ef"]
print(" ".join(list1))
>>> ab cd ef

```

## 10、切片反转

```list2 = "hello"
print(list2[::-1])
>>> olleh
```