text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
instead so very similar in spirit to | 1,507.679 | 4.321 |
what we did with a list but instead of | 1,510.279 | 4.081 |
using location zero and one we're much | 1,512 | 4.799 |
more clearly explicitly semantically | 1,514.36 | 4.52 |
using quote unquote name and quote | 1,516.799 | 4.36 |
unquote house because you index into | 1,518.88 | 4.72 |
lists and topples using numbers but you | 1,521.159 | 5.721 |
index into dictionaries using strings as | 1,523.6 | 5.04 |
I've done here all right let me go ahead | 1,526.88 | 4.76 |
and run python of studenty we'll again | 1,528.64 | 5.68 |
do Harry from Gryffindor and I think all | 1,531.64 | 4.88 |
as well let me run it one more time this | 1,534.32 | 4.359 |
time with Padma who in the movies is | 1,536.52 | 4.72 |
from Gryffindor but should really be | 1,538.679 | 3.281 |
from | 1,541.24 | 3.84 |
Ravenclaw are any questions then on this | 1,541.96 | 6.4 |
progression from tuples to lists to | 1,545.08 | 5.04 |
dictionaries we haven't necessarily | 1,548.36 | 4.24 |
introduced anything new other than those | 1,550.12 | 5.159 |
tuples which have been available to us | 1,552.6 | 4.76 |
all this time but the goal at the moment | 1,555.279 | 3.921 |
is just just to demonstrate this | 1,557.36 | 3.52 |
distinction among these different data | 1,559.2 | 3.719 |
types and how they each work a little | 1,560.88 | 5.12 |
bit differently what if a a combination | 1,562.919 | 6.401 |
of lists is there in a tuple so is the | 1,566 | 6.399 |
list like we can change the list because | 1,569.32 | 6.4 |
tupple are immutable but lists are | 1,572.399 | 5.601 |
mutable correct you can change the | 1,575.72 | 4.079 |
contents of lists and you can put most | 1,578 | 3.919 |
anything you want in them other lists or | 1,579.799 | 3.88 |
strings as I've done integers or | 1,581.919 | 3.841 |
anything else tles you can do the exact | 1,583.679 | 4 |
same thing but you cannot change them | 1,585.76 | 4.6 |
once you've created them a dictionary is | 1,587.679 | 5.321 |
more like a list in that it is mutable | 1,590.36 | 5.88 |
you can change it but the way you index | 1,593 | 5.24 |
into a dictionary is by way of these | 1,596.24 | 4.52 |
Keys these strings as we keep seeing | 1,598.24 | 5.88 |
rather than by numbers those numeric | 1,600.76 | 6.159 |
indices all right well let me propose | 1,604.12 | 5.36 |
that there is yet another way of solving | 1,606.919 | 5 |
this problem and indeed I would argue | 1,609.48 | 4.439 |
that there's now an opportunity to hand | 1,611.919 | 3.36 |
even though this program isn't | 1,613.919 | 3.36 |
particularly complicated all I'm doing | 1,615.279 | 5.321 |
is collecting a name from the user and a | 1,617.279 | 5.361 |
uh house from the user you could imagine | 1,620.6 | 4 |
wanting longer term to collect even more | 1,622.64 | 4.039 |
information like the student's Patronis | 1,624.6 | 3.84 |
or magical spell or a whole bunch of | 1,626.679 | 3.36 |
other information that might belong in a | 1,628.44 | 3.959 |
student and right now we're just kind of | 1,630.039 | 5.24 |
using these very general purpose data | 1,632.399 | 5.321 |
types in Python a tuple to combine some | 1,635.279 | 4.601 |
values together a list to do the same | 1,637.72 | 4.64 |
but let us change it later a dictionary | 1,639.88 | 4.159 |
which is more powerful because it's a | 1,642.36 | 3.88 |
little more structured it does have keys | 1,644.039 | 4.88 |
and it has values not just values but | 1,646.24 | 4.48 |
you know what this we wouldn't have to | 1,648.919 | 3.441 |
be having this conversation if the | 1,650.72 | 4.04 |
authors of python had just given us a | 1,652.36 | 5 |
data type called student right wouldn't | 1,654.76 | 4.32 |
it have been nice if there were just a | 1,657.36 | 3.52 |
type of variable I could create in my | 1,659.08 | 3.92 |
code called student then we wouldn't | 1,660.88 | 3.399 |
have to figure out well do we use a | 1,663 | 3.919 |
tuple or a list or a dictionary but | 1,664.279 | 4.361 |
that's pretty reasonable right you could | 1,666.919 | 4.161 |
imagine just a how slippery of a slope | 1,668.64 | 5.159 |
that is so to speak if the creators of a | 1,671.08 | 4.68 |
language had to anticipate all the | 1,673.799 | 3.681 |
possible types of data that Pro | 1,675.76 | 2.919 |
programmers like you and me want to | 1,677.48 | 3.679 |
store in your programs so they just gave | 1,678.679 | 4.561 |
us these general purpose tools but they | 1,681.159 | 4.481 |
gave us another general purpose tool | 1,683.24 | 4.439 |
that's going to allow us to create our | 1,685.64 | 4.519 |
own data types as well and actually give | 1,687.679 | 5.681 |
them names and that uh terminology is a | 1,690.159 | 6.041 |
class A Class is kind of like a | 1,693.36 | 6 |
blueprint for pieces of data object so | 1,696.2 | 5.8 |
to speak a class is kind of like a mold | 1,699.36 | 4.919 |
that you can define and give a name and | 1,702 | 4.12 |
when you use that mold or you use that | 1,704.279 | 4.76 |
blueprint you get types of data that are | 1,706.12 | 5.679 |
designed exactly as you want so in short | 1,709.039 | 5.36 |
classes allow you to invent your own | 1,711.799 | 5.12 |
data types in Python and give them a | 1,714.399 | 5.28 |
name and this is a primary feature uh of | 1,716.919 | 5.081 |
object-oriented programming to be able | 1,719.679 | 4.24 |
to create your own objects in this way | 1,722 | 4.039 |
and in the case of python and classes | 1,723.919 | 4.801 |
even give them some custom names so what | 1,726.039 | 4.601 |
does this mean in real terms well let me | 1,728.72 | 4.439 |
go ahead and come back to VSS code here | 1,730.64 | 4.24 |
and let me propose that we introduce a | 1,733.159 | 3.721 |
little bit of new syntax I'm going to go | 1,734.88 | 4 |
ahead and clear my terminal window first | 1,736.88 | 4.08 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.