Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introducing Lists!
You have completed Introducing Lists!
Preview
You can put lists inside of lists. This allows for you to create dimensions like rows and columns. Come explore!
Code
travel_expenses = [
[5.00, 2.75, 22.00, 0.00, 0.00],
[24.75, 5.50, 15.00, 22.00, 8.00],
[2.75, 5.50, 0.00, 29.00, 5.00],
]
Learn More
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And of course, you can do that,
a list allows you to store any data type.
0:00
And a list is just another data type.
0:02
Now at first, this might not seem
like it would be very beneficial.
0:06
Until you realized that you can use this
list inside of a list concept to represent
0:10
rows and columns.
0:15
The syntax may seem a little
confusing at first.
0:16
So I figured,
0:19
you should get a tiny taste cuz you might
see it out in a wild in code samples.
0:20
Let's take a quick look.
0:24
So let's imagine it's sometime
in your near future and
0:25
you're freelancing with
your Python skills.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up