Python字符串反转

 

对于str类型,python并没有reverse函数。然而,通过反向步进切片,我们可以高效地反转一串字符串。

= 'abcde' 
s[::-1]
原文地址:https://www.cnblogs.com/noobkey/p/4815383.html