文章分类 -  python实例

set方法
摘要:class set(object): """ set() -> new empty set object set(iterable) -> new set object Build an unordered collection of unique elements. """ def add(sel 阅读全文
posted @ 2017-05-16 09:58 法海降妖 阅读(159) 评论(0) 推荐(0)
算法初识
摘要:#斐波那契数列指的是这样一个数列 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368 def func(arg1,arg2,stop): if arg1 == 0: print(arg1,arg2) arg... 阅读全文
posted @ 2017-05-02 17:07 法海降妖 阅读(123) 评论(0) 推荐(0)
str实例
摘要:def capitalize(self) 首字母变大写 str1 = 'wanguyg' result = str1.capitalize() print(result) >>>Wanguyg def center(self, width, fillchar=None) 内容居中,width:总长度;fillchar:空白处填充内容,默认无 str1 = 'wanguyg' result = ... 阅读全文
posted @ 2017-04-18 17:50 法海降妖 阅读(206) 评论(0) 推荐(0)
int实例
摘要:数字 阅读全文
posted @ 2017-04-18 12:10 法海降妖 阅读(281) 评论(0) 推荐(0)