2013年7月6日土曜日

Python で文字列を逆向きにする

以下のスクリプトは、文字列を逆向きに表示する。
s = "Hello Python World"
print s[len(s)::-1]

0 件のコメント:

コメントを投稿