上一篇博客,介绍了列表类型,本篇将介绍数组类型Array、字典类型(Map),以及可变数组(ResizeArray)、Set类型。 一、数组类型 (Array) 数组类型,在语义上表示一组相同类型的集合。
基于16个网页-相关网页
另一方面,它提供了比C 更多的错误检查,并且,做为一门非常高级的语言,它拥有内置的高级数据类型,例如可变数组和字典,如果通过C 来实现的话,这些工作可能让你大干上几天的时间。
On the other hand, Python also offers much more error checking than C, and, being a very-high-level language, it has high-level data types built in, such as flexible arrays and dictionaries.
And I pointed out that lists are mutable, showed you some examples of mutation.
我提到了数组是可变的,并给你们举了一些例子。
Lists differ from strings in two ways; one way is that it's mutable, the other way is that the values need not be characters. They can be numbers, they can be characters, they can be strings they can even be other lists.
有两个不同之处,一个在于数组是可变的;,另一点在于数组里面的值,不一定是字符,可以是数,可以是字符,也可以是字符串,甚至可以是其他的数组。
应用推荐