python中,序列对象有str、bytes、 bytearray、 list、 tuple、 range。所谓序列,说明是有序的,可以通过索引做一些特定的操作。首先先了解序列对象中比较重要的两个:str 和 list,然后探讨下序列对象的共有操作。 ...
分类:
编程语言 时间:
2017-10-09 10:54:06
阅读次数:
236
local MainScene = class("MainScene", function() return display.newScene("MainScene")end)local net = require("framework.cc.net.init")local ByteArray = ...
分类:
其他好文 时间:
2017-10-08 18:57:22
阅读次数:
134
1、布尔型:True、False 2、数值型:int、float、long、complex 3、迭代器型:有 __iter__() 方法和 next() 方法,生成器也是其中一种 4、序列型(sequence type):list、str、unicode、tuple、bytearray、xrange ...
分类:
编程语言 时间:
2017-09-21 21:11:50
阅读次数:
149
一、一个字符串转byte数组怎么转? 二、又想把生成的数组转回字符串怎么办? 以上的轻松愉快仅限于字符串之间互转(适当的时候还要注意编码格式)。 三、如果一个的数值byte[]数组怎么转成字符串?例如: byte[] byteArray = new byte[]{-60,60}; 如果用new St ...
分类:
其他好文 时间:
2017-09-12 21:22:52
阅读次数:
234
自2003年开始,断断续续用了12年C++,直到这两年做物联网嵌入式开发,感觉对C++的掌握仅有10%左右。习惯了C#开发,C++倒显得难以下手!今天就一个函数返回问题跟辉月兄弟讨论一番,大有所获,足以解决我们目前80%的问题,感觉对C++的掌握上升到了20%。背景,现有字节数组ByteArray和 ...
分类:
编程语言 时间:
2017-09-02 00:19:55
阅读次数:
221
1.数据结构 1.1 内置序列类型 四种序列类型: 1.容器序列:list、tuple和collections.deque 2.扁平序列:str、bytes、bytearray、memoryview和array.array 3.可变序列:list、bytearray、array.array、coll ...
分类:
编程语言 时间:
2017-08-24 21:25:25
阅读次数:
220
欢迎访问个人网站:www.comingnext.cn 1. 关于Python内置序列类型 a. 按能否存放不同类型的数据区分 容器序列: list、tuple 和collections.deque这些序列能存放不同类型的数据 扁平序列: str、bytes、bytearray、memoryview和 ...
分类:
编程语言 时间:
2017-08-20 21:17:01
阅读次数:
282
内置函数 1、abs绝对值 2、all与any 3、ascii,对象的类中找__repr__,获取齐返回值 4、进制(bin,oct,int,hex) 5、bytes 字节,bytearray 字节列表[zijie] 6、chr()与ord() 7、divmod求商和余数 8、eval与exec 9 ...
分类:
编程语言 时间:
2017-08-12 22:40:09
阅读次数:
155
英文文档: class bytearray([source[, encoding[, errors]]]) Return a new array of bytes. The bytearray class is a mutable sequence of integers in the range ...
分类:
编程语言 时间:
2017-08-07 23:12:17
阅读次数:
476
英文文档: class bytearray([source[, encoding[, errors]]]) Return a new array of bytes. The bytearray class is a mutable sequence of integers in the range ...
分类:
编程语言 时间:
2017-07-31 10:15:52
阅读次数:
279