<

Python Programming: Lists

Posted on
6,174 Points
174 Views
Last Modified:
Experience Level: Beginner
3:59
Learn the basics of lists in Python.

Video Steps

1. Lists, as their name suggests, are a means for ordering and storing values.

2. Lists are declared using brackets; for example: t = [1, 2, 3]

3. Lists may contain a mix of data types; for example: t = ['string', 1, True]

4. Lists may be nested, for example: t = [ 'string', [1, True]]

5. List elements are accessed by index; for example: t[0]

6. The slice method is used to access a specific range of elements within a list; for example: t[1:3]

0
Author:Dototot
1 Comment

Expert Comment

by:Abdou DOUCOURE
Very simple and quick. Good micro tuto
0

Featured Post

CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
A guide on the process of automating change or gathering data from multiple Cisco IOS devices. If this can help you - please use it. God knows we all need a few extra minutes in our day.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month