自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

转载 python的 sort()函数

Python中的sort()方法用于数组排序,本文以实例形式对此加以详细说明:一、基本形式列表有自己的sort方法,其对列表进行原址排序,既然是原址排序,那显然元组不可能拥有这种方法,因为元组是不可修改的。?x = [4, 6, 2, 1, 7, 9]x.sort()print x # [1, 2, 4, 6,

2017-02-02 09:38:07 670

转载 Python格式化字符 %s %d %f

格式 描述%% 百分号标记 #就是输出一个%%c 字符及其ASCII码%s 字符串%d 有符号整数(十进制)%u 无符号整数(十进制)%o 无符号整数(八进制)%x 无符号整数(十六进制)%X 无符号整数(十六进制大写字符)%e 浮点数字(科学计数法)%E 浮点数字(科学计数法,用E代替e)%f 浮点数字(用小数点符号)%g 浮点数字(根据值的大小采

2017-02-01 09:37:28 52817

转载 dict()字典的函数『索引 新增 删除 键、值、键值对 循环 长度』

class dict(object):    """    dict() -> new empty dictionary    dict(mapping) -> new dictionary initialized from a mapping object's        (key, value) pairs    dict(iterable) -> new diction

2017-01-31 13:32:11 1295

转载 tuple()元组的函数『索引 切片 循环 长度 包含』

lass tuple(object):    """    tuple() -> empty tuple    tuple(iterable) -> tuple initialized from iterable's items        If the argument is a tuple, the return value is the same object. 

2017-01-31 13:29:48 778

转载 list(0列表的函数『索引 切片 追加 删除 长度 切片 循环』

class list(object):    """    list() -> new empty list    list(iterable) -> new list initialized from iterable's items    """    def append(self, p_object): # real signature unknown; restore

2017-01-31 13:21:20 963

转载 int()数字类型的函数

class int(object):    """    int(x=0) -> int or long    int(x, base=10) -> int or long        Convert a number or string to an integer, or return 0 if no arguments    are given.  If x is f

2017-01-31 13:00:22 1765

转载 str() 字符串的常用函数『移除空白 分割 长度 索引 切片』

class str(basestring):    """    str(object='') -> string        Return a nice string representation of the object.    If the argument is a string, the return value is the same object.

2017-01-31 12:26:21 555

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除