Python如何利用字符串切片逆转字符串?

1 个回答

Coco老师 - 科普专家
擅长:编程教育
#!usr/bin/env <a href="http://www.pxcodes.com/Python/" target="_blank" class="infotextkey">python</a>
# encoding:utf-8
def strReverse(strDemo):
  return strDemo[::-1]
print(strReverse('qbitschool.cn'))