Skip to main content

Lists

  • Chapter
  • First Online:
Learn to Program with Python
  • 12k Accesses

Abstract

Prior to this chapter, we talked about four types of data: integer, float, string, and Boolean. But imagine that you want to represent a lot of data—for example, the names of all the students in a class, or better yet, the names of all students in a school, or a city, or a state. So far, our definition of a variable allows us to only represent a single piece of data. Therefore, if we wanted to represent a group of students’ names, we would do something like this.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Irv Kalb

About this chapter

Cite this chapter

Kalb, I. (2016). Lists. In: Learn to Program with Python. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2172-3_7

Download citation

Publish with us

Policies and ethics