1 00:00:00,720 --> 00:00:04,800 Now topples like I said are quite similar to lists. 2 00:00:04,980 --> 00:00:17,690 So if I wanted to I can say new topple and use my topple and then slice that topple. 3 00:00:17,700 --> 00:00:30,560 So for example if I do one too like this and print new topple I'm going to get to karma. 4 00:00:30,650 --> 00:00:33,090 Why is that. 5 00:00:33,090 --> 00:00:39,490 Well we started 0 1 and 2 if I did 4 here and click Run. 6 00:00:41,070 --> 00:00:49,280 I get 2 3 4 it's still a temple but you have to remember that a temple that only has a single item tends 7 00:00:49,280 --> 00:00:58,410 to have this little comma at the end but it's still a temple and just like a list I can assign different 8 00:00:58,410 --> 00:00:58,860 things. 9 00:00:58,860 --> 00:01:11,690 For example I can say X equals to my topple 0 and then I can say Y equals my top all 1 and x and y will 10 00:01:11,690 --> 00:01:27,770 equal 1 and 2 but a short form of doing this again similar to lists is to say hey I want X Y Z may not 11 00:01:28,250 --> 00:01:37,280 other to be the values assigned from the top so that if I do X here and I run I get one. 12 00:01:37,470 --> 00:01:42,340 If I do Z and I run I get 3. 13 00:01:42,360 --> 00:01:44,500 What if I do other. 14 00:01:44,540 --> 00:01:50,280 And if I click Run I get 4 and 5 as a list. 15 00:01:50,380 --> 00:01:50,910 All right. 16 00:01:50,920 --> 00:01:55,290 If your head doesn't hurt by now don't worry I have some good news. 17 00:01:55,330 --> 00:02:02,100 Luckily for us a Tupolev has only two methods that we care about count an index. 18 00:02:02,110 --> 00:02:03,060 How nice is that. 19 00:02:03,160 --> 00:02:05,560 So nice and simple. 20 00:02:05,690 --> 00:02:07,290 Guess what these mean. 21 00:02:07,310 --> 00:02:12,710 So let's go back to my couple and now try these out. 22 00:02:12,800 --> 00:02:18,170 If I go my top all debt count well it's going to count the value. 23 00:02:18,380 --> 00:02:24,220 So if we want to count how many fives occur in the topo I get one. 24 00:02:24,430 --> 00:02:28,950 If I had a another five in the top all I get to. 25 00:02:29,030 --> 00:02:31,330 What about index. 26 00:02:31,420 --> 00:02:32,940 What's the index of five. 27 00:02:34,730 --> 00:02:45,660 Well the index of 5 is 4 because 0 1 2 3 for the first value that it finds it's going to return the 28 00:02:45,660 --> 00:02:46,660 index of. 29 00:02:47,190 --> 00:02:56,310 And then finally we can also do length right we can use this built in function to run length and it's 30 00:02:56,310 --> 00:03:02,510 going to tell us that yep it's has a length of 6 awesome. 31 00:03:02,700 --> 00:03:03,380 There it is. 32 00:03:03,390 --> 00:03:05,030 We're flying through them now. 33 00:03:05,070 --> 00:03:07,290 This is our third data structure. 34 00:03:07,280 --> 00:03:12,750 Remember they're simply lists that are immutable. 35 00:03:12,750 --> 00:03:14,260 I'll see in the next one by.