Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS1110 Today: collections.

Similar presentations


Presentation on theme: "CS1110 Today: collections."— Presentation transcript:

1 CS1110 Today: collections

2 Let’s grade all the students
Repetition Groups of students String is one example of a group Contain several characters Today: various types that collect several things in one variable

3 Ordered Collection Type that has other things inside it
Ordered: a first thing, second, third, … Sequence

4 Ordered Collections Type Stores Syntax Mutable? Range int range(3, 7)
No Str character “” Tuple anything ( , , ) List [ , , ] Yes

5 Operations on Sequences
Syntax Range? Str? Tuple? List? length len(s) Yes yes index s[1] slice s[1:3] concatenate s1 + s2 no multiply s*4 assignment s[1] = 5 No Yes (mutable)


Download ppt "CS1110 Today: collections."

Similar presentations


Ads by Google