A list is a commonly used sequence. Learn how to create lists in Python.
- [Instructor] When you're programming, … you might find yourself wanting to store a number … for you use later in your code. … Say that number is five. … You can store it by doing something like this. … I can create a variable named "n" … and give it a value of five. … So whenever I refer to n, … I have access to the number five. … I'm going to run this cell … and in the next cell I can print out n … and when I run this, five gets printed out. … Now, if you want to store multiple numbers together, … Python has a clever way of doing this … using something called a sequence. … A sequence allows you to store a collection of data. … One type of sequence is called a list. … A list has a specific order and the items in the list … can be changed whenever you want. … Square brackets are used to enclose the items in the list … and commas are used to separate the items from each other. … So you can create a list containing the numbers you have … and store the list in a variable. … If your numbers are five, 10, 15, and 20, …
This course was created by Madecraft. We are pleased to host this content in our library.
- What is Python?
- Strengths and benefits of Python
- Types of data
- Storing data using variables
- Built-in and custom functions
- Lists and tuples
- Conditional statements
- Iteration with loops
- Recursive functions
- Object-oriented programming
Skill Level Beginner
Learning the Python 3 Standard Librarywith Kathryn Hodge2h 9m Intermediate
Python Standard Library Essential Trainingwith Joe Marini2h 18m Intermediate
1. Defining Python
2. Fundamentals of Programming in Python: Data
3. Fundamentals of Programming in Python: Functions
4. Fundamentals of Programming in Python: Sequences
5. Fundamentals of Programming in Python: Conditional Statements
6. Fundamentals of Programming in Python: Iteration
7. Fundamentals of Programming in Python: Recursion
Define recursive functions6m 13s
8. Quick Intro to Object-Oriented Programming in Python
Next steps1m 8s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.