Abstract
This chapter shows how repetitive tasks in a program can be automated by loops. We also introduce list objects for storing and processing collections of data with a specific order. Loops and lists, together with functions and if-tests from Chapter 3, lay the fundamental programming foundation for the rest of the book. The programs associated with the chapter are found in the folder src/looplist.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Langtangen, H. (2011). Loops and Lists. In: A Primer on Scientific Programming with Python. Texts in Computational Science and Engineering, vol 6. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-18366-9_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-18366-9_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-18365-2
Online ISBN: 978-3-642-18366-9
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)