代码示例:(标识:python_howto_reverse_string_1)
python_howto_reverse_string_1.py
txt = "Hello World"[::-1]
print(txt)
运行结果: