切割字符串

# -*- coding: utf-8 -*-

str = '123456789'

print(str[3:])

print(str[2:3])

print(str[-2:])

print(str[:-2])

---

456789
3
89
1234567