Advertisement

Lists

  • Irv Kalb
Chapter

Abstract

Prior to this chapter, we’ve 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 city, or 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:

student1 = 'Joe Schmoe'
student2 = 'Sally Smith'
student3 = 'Henry Jones'
student4 = 'Betty Johnson'
student5 = 'Chris Smith'

Copyright information

© Irv Kalb 2018

Authors and Affiliations

  • Irv Kalb
    • 1
  1. 1.Mountain ViewUSA

Personalised recommendations