代码示例:(标识:python_string_negativeindex)
python_string_negativeindex.py
b = "Hello, World!"
print(b[-5:-2])
运行结果: