There are times when you want to reverse the order of strings and arrays. In such a case, you can reverse it by doing the following.
Below sample
reverse.py
alpha = "abcdefghijklmnopqrstuvwxyz"
alpha = alpha[::-1]
print alpha
zyxwvutsrqponmlkjihgfedcba
For more information http://d.hatena.ne.jp/redcat_prog/20111104/1320395840
Recommended Posts