If I want to create a set or a sequence representing these things, I simply insert into that list.
如果我想创建一个集合,或者一个序列表示这些东西,我只要简单的把它插入列表中。
And I want to show you a little bit more detail of that, so let's create a simple little list here.
我还想给你们再讲详细些,那让我们来创建一个简单的列表吧。
Didn't create a new list. The old l is still there but it's different than it used to be.
它改变了数组,而并没有新建一个数组,老数组l依旧存在。
I did not want to make a list, I wanted to create a tuple thank you for catching it. I want parens not square brackets there.
为什么这里有错误了,我并不想要创建,一个列表,我想创建一个元组,谢谢你,发现了这个错误。
So, what's the idea? If I know what my hash function does, it maps, in this case characters into a range zero to 256, which is zero to 255, I create a list that long, and I simply mark things.
我知道我的哈希函数做什么,在这个例子中,它将字母,映射成0到255的256个数字,我创建了一个这么长的列表,并且我只是简单的标志这些东西。
应用推荐