Search for tag: "tuple"

Lesson28.8 List Comprehension (OPTIONAL)

This video is not optional because the material is advanced. It is optional because this video series has run long and this topic is less important for you to know. When we are done with out…

From  Hannah Lee 24 plays

Lesson 28.7 Iterator Chaining

Generators take iterators as input, but they also produce one as output. In this video we show how to chain iterators together, doing complex operations on our data.

From  Hannah Lee 42 plays

Lesson 28.5 Generator Design

Now that we know how generators work, it is time to write our own. In this video we show how easy it is. We just take out experience with the accumulator pattern and replace the accumulator with a…

From  Hannah Lee 54 plays

Zoom Oct. 20. Recursion

Recursion is a powerful programming tool and one of the fundamental principles of computer science. It is used in many advanced algorithms.In this session, we will just focus on divide-and-conquer,…

From  Hannah Lee 32 plays

Lesson 20.10 Representation Methods

When we first introduced objects, we talked about the concept of object representation. But how does Python know how to use this representation. In this video, we see that this is the result of…

From  Hannah Lee 69 plays

Lesson 19.8 Keyword Expansion (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. Keyword expansion is the dictionary version of tuple expansion. It is used in modules like Kivy to…

From  Hannah Lee 75 plays

Lesson 19.5 Dictionaries and For-Loops

Dictionaries are not sliceable, but they are iterable. In this video we show the many different ways you can use a dictionary in a for-loop. The primary thing to understand is that you have to…

From  Hannah Lee 83 plays

Zoom Oct. 15. For-Loops

In this session, we review the for-loop, which is the next control structure. This is the last control structure we will need for a while.For-loops are pretty easy to use in Python, and most students…

From  Hannah Lee 18 plays

Zoom Oct. 13. Lists (and Sequences)

In this session we review the two new sequence data types: tuples, and lists. This is the last material on the first prelim.For the most part these are similar to strings, and so we will do a lot of…

From  Hannah Lee 14 plays

Lesson 17.4 Divide and Conquer

Recursion has many, many uses. But one of the most popular applications is divide-and-conquer. In this video we introduce this new concept and show how we will use to solve several problems on…

From  Hannah Lee 101 plays

Lesson 16.8 Tuple Expansion (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. You might have noticed that some functions, like max can take an arbitrary number of arguments. In…

From  Hannah Lee 43 plays

Lesson 16.4 Range-Based For-Loops

Strings, lists, and tuples are not the only iterable types. In this video we introduce the range function, which creates another iterable value. This is going to allow us to do several things that we…

From  Hannah Lee 92 plays

Lesson 15.8 Slice Assignment (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. Lists don’t just allow us to use a single position in an assignment statement. We can also…

From  Hannah Lee 45 plays

Lesson 15.7 Mutable List Functions

Because lists are mutable, just like general objects, we can modify them in the body of a function. In this video we show how to write mutable list functions, which are (typically) procedures that…

From  Hannah Lee 64 plays

Lesson 15.4 List Assignment

The big advantage that lists have over tuples is that they are mutable.In this video we show how to write assignment statements that modify the contents of a list.

From  Hannah Lee 66 plays

Lesson 15.3 List Expressions

In this video we introduce the list, which looks almost exactly the the same as a tuple, except that it is written differently. Indeed, it supports many of the same operations as tuples. Together,…

From  Hannah Lee 75 plays