Learning Python-List Operation

1. List is the most general sequence provided by the language.

mutable,arbitrary collections-lists of files in a folder,names, and so on


2. Operations:

1) sequence operations:index,len,slice...

2) type-specific operations

append,

pop, 

remove

insert

extend

reverse


3) bounds checking(C does't support bound checking)


4) Nesting


5)List Comprehension Expression(列表推导): Make new lists of results, but they can be used to iterate over any iterable object.(like Range(), this illustrate that python 

includes both simple and advanced tools in its arsenal(军库,军械库)List comprehensions are an optional feature, but they
tend to be very useful in practice and often provide a substantial processing speed
advantage.

use comprehensions ,lists, dictionaries , sets , generators can all be built 



阅读更多
个人分类: Learning_Python
想对作者说点什么? 我来说一句

Python-list

Python基础知识之list

iDestro iDestro

2017-11-24 18:40:46

阅读数:119

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭