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

1 个回答|167 次阅读
Coco老师 - 公众号:量位学堂Qbit编程
擅长:编程教育
#!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'))