Life is short, you need Python

上一页 1 ··· 46 47 48 49 50
摘要: join 方法用于连接字符串数组Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--s=['a','b','c','d']print''.join(s)print'-'.join(s)输出结果:abcda-b-c-d使用 % 连接多个变量Code high... 阅读全文
posted @ 2010-06-24 15:34 runfox545 阅读(408) 评论(0) 推荐(0)
摘要: Python中的strip用于去除字符串的首位字符,同理,lstrip用于去除左边的字符,rstrip用于去除右边的字符。这三个函数都可传入一个参数,指定要去除的首尾字符。注意的是,传入的是一个字符数组,编译器去除两端所有相应的字符,直到没有匹配的字符,比如:Code highlighting produced by Actipro CodeHighlighter (freeware)http:/... 阅读全文
posted @ 2010-06-24 15:22 runfox545 阅读(342) 评论(0) 推荐(0)
摘要: Python中打印字符串时可以调用ljust(左对齐),rjust(右对齐),center(中间对齐)来输出整齐美观的字符串,使用起来非常简单,包括使用第二个参数填充(默认为空格)。看下面的例子就会明白了:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--... 阅读全文
posted @ 2010-06-24 11:12 runfox545 阅读(246) 评论(0) 推荐(0)
摘要: If realize this funciton by C language:[代码]In Python:[代码]The example code is come from coderzh's blog, thank you very much!isinstance(object, classinfo)Return true if the object argument is an instanc... 阅读全文
posted @ 2010-06-22 17:21 runfox545 阅读(356) 评论(0) 推荐(0)
摘要: Come from Mr. Flow------------------------------------------------------------------------------------------------------------啥叫软件配置管理?——一个通俗的解释作为一位从事软件配置管理工作的同志,我经常被亲朋好友问到的是,我有时候要向各级领导游说的... 阅读全文
posted @ 2010-06-22 14:47 runfox545 阅读(255) 评论(0) 推荐(0)
摘要: Python provide build-in function to help us translate bettween Char and ASCII, for example:[代码] 阅读全文
posted @ 2010-06-21 12:35 runfox545 阅读(174) 评论(0) 推荐(0)
摘要: [代码]Wow, Python is so powerful, Let start to enjoy it now! 阅读全文
posted @ 2010-06-13 09:18 runfox545 阅读(224) 评论(0) 推荐(0)
摘要: Today is last working day of the Dragon Boat Festival coming,the World Cup Football Match is a big present for us, maybe some people is even more crazy than me, anyway, I hope Brazil and Argentina can... 阅读全文
posted @ 2010-06-13 08:58 runfox545 阅读(302) 评论(0) 推荐(0)
摘要: I have my ownblog now! mark it at this time!I find a very userful bolg to learn python, thanks Michale and codeZH at first :)http://www.hezhigeng.com/blog/http://www.cnblogs.com/coderzh/archive/2008/0... 阅读全文
posted @ 2010-06-12 17:31 runfox545 阅读(237) 评论(0) 推荐(0)
上一页 1 ··· 46 47 48 49 50
白月黑羽 Python教程 白月黑羽Python