Recipe 1.7. Reversing a String by Words or Characters(Python Cookbook)
摘要:
reverseCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1astring="helloray"2revwords=astring.split()3revwords4['hello','ray']5revwords.reverse()6revwords7['ray','hello']8revwords=''.join(revwords)9revwords10'rayhello'11importre 阅读全文
posted @ 2010-12-19 14:21 Ray Z 阅读(159) 评论(0) 推荐(0)
浙公网安备 33010602011771号