From the course: Programming Foundations: Beyond the Fundamentals
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Creating simple collections - Python Tutorial
From the course: Programming Foundations: Beyond the Fundamentals
Creating simple collections
- I have a bunch of sheets of paper here that contain related information. I could keep them all laid out on my desk, so I can easily pick up any one of them at any time. But I don't have the desk space to do that for very many sheets. And if I need to do something like copy or scan the whole set, doing it a sheet at a time is pretty inefficient. Instead, I can gather them all up into a stack. (papers rustling) Knowing that these documents are all related means I know that if I need, say, one of the contracts for a certain project, I just need to look in this stack. And if I want to copy all of them, for instance, I could just stick the whole stack in the auto feeder on my copier and let the machine do the rest. One of the simplest types of collection in programming groups pieces of data together in a certain order and assigns the collection a name. In Python, this type of collection is known as a list. To create a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Understanding collections2m 31s
-
(Locked)
Creating simple collections3m 16s
-
(Locked)
Creating more complex collections3m 22s
-
(Locked)
Working with collections3m 24s
-
(Locked)
Collections in other languages2m 3s
-
(Locked)
Challenge: Working with a collection1m 3s
-
(Locked)
Solution: Working with a collection5m 26s
-
-
-
-
-
-
-
-
-
-
-