Sequences
Sequences
复制标题
DOI:
10.1007/978-3-319-13072-9_4
复制
发表时间:
2021-02
期刊:
影响因子:
--
通讯作者:
Jordi Cortadella
中科院分区:
文献类型:
--
作者:
Jordi Cortadella
Computers are really good at dealing with large amounts of information. They can repeat a task over and over again without getting bored. When they repeat a task they are generally doing the same thing to similar data or objects. It is natural to want to organize those objects into some kind of structure so that our program can easily switch from one object to the next. How objects are added to a sequence or collection and how we move from one item to the next has some impact on how we might want to organize the collection of data in a program. In this chapter we look at different ways of organizing data into a sequence. We’ll also examine how to use Python to make working with sequences convenient. Operator overloading in Python lets us build sequences that we can manipulate with intuitive operations. Finally, we also examine how the organization of a sequence affects the computation complexity of operations on it.