This comment is reply for 2953 ocean: 普通に。(文字列の反転). Go to thread root.
dpp #2954(2007/09/10 11:46 GMT) [ Python ] Rating2/2=1.00
もうちょっとシンプルにしました。
1 2 3 4 5 6 7 8 9
# coding: shift_jis def reverse_string(s, coding="shift_jis"): return unicode(s, coding)[::-1].encode(coding) if __name__ == '__main__': print reverse_string("Hello") print reverse_string("こんにちは") print reverse_string("濁点(だくてん)")
Rating2/2=1.00-0+
[ reply ]
dpp
#2954()
[
Python
]
Rating2/2=1.00
Rating2/2=1.00-0+