03 2007 档案
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--s='测试字符串'importtempfiletemp=tempfile.TemporaryFile()print>>temp,stemp.seek(0)s1=temp.read()pytho...
阅读全文
摘要:使用dump与load函数Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--foo='foo.txt'mydict={'user':'xmli','pass':'password'}mylist=['helloworld',526]fromcPickle...
阅读全文
摘要:最近研究了一下Python,觉得他这种问答式的界面特别适合学习编程,下面就举两个例子。1.快速排序的算法描述>>> def qsort(aL):... if aL==[]:return []... else:... smaller=[x for x in aL[1:] if x<aL[0]] #比aL[0]小的部分... bigger=[x for x in aL[1:] ...
阅读全文

浙公网安备 33010602011771号