<

Go Premium for a chance to win a PS4. Enter to Win

x

Python Programming: Lists

Posted on
6,145 Points
145 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
Comment
Author:Dototot
1 Comment
 

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

Article by: Swadhin
Introduction of Lists in Python: There are six built-in types of sequences. Lists and tuples are the most common one. In this article we will see how to use Lists in python and how we can utilize it while doing our own program. In general we can al…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Suggested Courses
Course of the Month7 days, 4 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month