So the first thing we'll do is, we'll print the element, in this case it will be a list right? Because it's a list with two lists in it.
因此这儿我们要做的第一件事,就是要显示元素,在这儿元素就是数组了对不对?,因为这个数组包含了两个数组。
I'm going to print it and let's see what it prints.
我要将其打出来,我想显示下数组的内容。
And then we'll see if it is. So I think I put in one a two, right? Or one a two?
我认为我们把1a2放进了数组对不对?,那么显示结果应该是1,a,2了?
Then the next thing in the loop, we're going to enter a nested loop and say for every college in the list e, we're going to print the name of the college.
循环中的第二件事,是进入一个嵌套循环,这个嵌套循环将数组中的,大学名字显示出来。
All right, so let's just see what we got, we'll print univs. Nope, not defined.
我们来显示下univs数组,噢,还没定义。
So I can concatenate techs plus ivys and assign that result to univs, and then when I print it you'll notice I just get a list of five strings.
和ivys数组用加号串联运算,并把结果赋值给univs数组,接下来我显示下univs的结果,你注意到我得到了一个。
Now what do we get if we print l? MIT is gone.
再试试显示数组内容,MIT没了。
We can put a list in the list again, as we've seen before. So let's put the list containing the string a, and I'll print out so now we see something pretty interesting about a list, that we can mix up all sorts of things in it, and that's OK.
数组放到数组中去,让我们把这个包含,字符串a的数组放进去,然后再显示,我们看到了一些,挺有趣的事情:我们可以把各种,各类的东西混合着放进去,没问题。
应用推荐