PLEASE SUBSCRIBE!!!
THIS VIDEO HAS BEEN REPLACED: • Python Programming: Lesson 71 - Const...
In the previous lesson ( • Python Programming: Lesson 70 - Pass ... ), we talked about a concept called pass-by-value. Here, Python passes information using a copy of the value, rather than a literal reference to the variable itself. We review the 3 approaches we have for resolving this phenomenon:
1. use an instance variable
2. return a new value
3. use a list with one element
We also review hex(x), chr(x), and ord(x) in this video. The main goal is to review shorthand set notation, using a | b instead of a.union(b) and a & b instead of a.intersection(b) and a - b instead of a.difference(b)
If a is a regular set and b is a regular OR frozen set, then a|b and a&b and a-b return a regular set
If x is a frozen set and y is a regular OR frozen set, then x|y and x&y and x-y return a frozen set
Remember that the keys in a dictionary have to be immutable. You cannot use lists, sets, or dictionaries, but you could use tuples, frozen sets, or frozen dictionaries.
0:46 Overview of Inheritance and Callable Objects
5:41 Review of Pass by Value
11:34 Review of Hex Numbers in Python
13:55 Review of ASCII Character Encoding
15:07 Review of Concise Set Notation
17:04 Review of Immutable Keys for Dictionaries
In the next lesson ( • Python Programming: Lesson 72 - Final ), we'll review concise set notation and immutable keys for dictionaries. We'll also go back and again review hex(x), chr(x), ord(x), zip(x,y), and the pass-by-value phenomenon. Finally, we'll remember to treat iter(x) as a generator.
Thanks for watching, and PLEASE SUBSCRIBE!!!