python的加密算法(1):反转加密

  说白了,就是把字符串倒序。

  在js里,有一个reverse。但是python中没有。

       不过,有一个更简单的方法,就是:

  ‘abcd’ [::-1]

这里,具体解释一下:

(参看:https://docs.python.org/2/whatsnew/2.3.html#extended-slices)

原文地址:https://www.cnblogs.com/aomi/p/7094490.html