1 00:00:12,090 --> 00:00:12,760 Welcome. 2 00:00:12,780 --> 00:00:19,160 And in this lecture, we will see some live examples on petroleum based on previous lectures, examples. 3 00:00:19,470 --> 00:00:23,900 So let's try to write them here and to run them and see what happens. 4 00:00:24,270 --> 00:00:27,330 So once you open your project, just create a new file. 5 00:00:27,540 --> 00:00:29,280 You can call it collections. 6 00:00:31,350 --> 00:00:35,240 Toppo, BASIX, yeah, it's here as well. 7 00:00:36,750 --> 00:00:39,450 Collections, double basics. 8 00:00:39,900 --> 00:00:44,850 So first of all, let's create a table called professions. 9 00:00:46,230 --> 00:00:56,070 And the industry, right and right here, we have round brackets, all right, so this one tells us 10 00:00:56,070 --> 00:01:03,240 that we are dealing with double indifference from this, that this means we are dealing with a list. 11 00:01:03,540 --> 00:01:03,900 All right. 12 00:01:03,900 --> 00:01:05,520 So we have we have couple now. 13 00:01:05,820 --> 00:01:06,960 We have front end. 14 00:01:09,920 --> 00:01:10,760 We have. 15 00:01:12,060 --> 00:01:15,390 Backhand, we have dev ops. 16 00:01:16,940 --> 00:01:25,050 And we have Kuai and once we have this Stapel, we would like to, first of all, print it right. 17 00:01:25,280 --> 00:01:26,900 So let's try to print it. 18 00:01:33,370 --> 00:01:35,380 See that everything's fine. 19 00:01:38,880 --> 00:01:41,820 Like this, again, with casting, as always. 20 00:01:44,600 --> 00:01:50,180 Yeah, so here we have our Toppo, and also I'm going to teach you a cool trick if you want to know 21 00:01:50,390 --> 00:01:54,020 which type of collection or which type of variable you're dealing with. 22 00:01:54,200 --> 00:01:57,170 You can just do the keyword type. 23 00:01:57,380 --> 00:01:57,760 All right. 24 00:01:57,770 --> 00:02:05,450 You see right here, once you click the T word T letter, you can see it in the pop up or type and inside 25 00:02:05,450 --> 00:02:06,470 another brackets. 26 00:02:06,470 --> 00:02:13,010 Just put your data and there a type and just print that. 27 00:02:13,430 --> 00:02:20,560 So we have professions in the industry rounded by type and rounded by print. 28 00:02:20,840 --> 00:02:29,810 So this will print us the type of the collection, the type of the data collection, and let's try to 29 00:02:29,810 --> 00:02:30,290 run it. 30 00:02:31,910 --> 00:02:37,310 Right, so you can see right here that we're dealing with double and let's change it, let's four square 31 00:02:37,310 --> 00:02:40,370 brackets here for a second and see what we get. 32 00:02:42,210 --> 00:02:43,380 Yeah, like that. 33 00:02:46,560 --> 00:02:49,890 And immediately, it's a change to a list. 34 00:02:50,520 --> 00:02:56,220 All right, so this lectures about topos, so let's leave it at it, as is that. 35 00:02:56,410 --> 00:02:56,930 All right. 36 00:02:56,940 --> 00:02:58,110 All right. 37 00:02:58,110 --> 00:03:01,440 Now let's try to see the examples from the previous lecture. 38 00:03:01,650 --> 00:03:07,050 So, first of all, let's print off the cell number one, off the tuple. 39 00:03:07,170 --> 00:03:11,640 So print off cell index one. 40 00:03:14,440 --> 00:03:21,850 And here we said that we're going to do it by mentioning the Toppo and inside square brackets, putting 41 00:03:21,850 --> 00:03:23,500 the number of the index. 42 00:03:24,100 --> 00:03:25,960 OK, let's print it. 43 00:03:27,690 --> 00:03:36,240 And there we have it, we have Back-End, which is this cell, OK, right after let's try to print. 44 00:03:40,060 --> 00:03:49,750 The last sale of the collection and how are we going to do it again, same as we did in this, we just 45 00:03:49,750 --> 00:03:56,140 mentioned the name of the collection and inside Square Records just put number minus one and you should 46 00:03:56,140 --> 00:03:57,320 get the last sale. 47 00:03:57,960 --> 00:03:58,470 Yeah. 48 00:03:58,600 --> 00:04:00,130 So we can see it right here. 49 00:04:00,310 --> 00:04:08,530 Kiwa So if you put like number minus two here, you will get their jobs, which is one before it. 50 00:04:09,880 --> 00:04:12,220 Correct, we have that box right here. 51 00:04:12,880 --> 00:04:21,970 OK, so now we want to do the last example, the last manipulation we discussed in the previous video, 52 00:04:22,240 --> 00:04:24,160 which is printing. 53 00:04:26,750 --> 00:04:33,530 A range of cells out of the tuple and we're going to achieve it. 54 00:04:35,940 --> 00:04:43,230 By mentioning, first of all, casting, by mentioning the top ball and inside square brackets, just 55 00:04:43,230 --> 00:04:44,980 put one, two dots three. 56 00:04:45,600 --> 00:04:47,040 This should do the work. 57 00:04:47,250 --> 00:04:51,930 And again, as we discussed, this will give us cell number one, cell number two. 58 00:04:51,930 --> 00:04:55,530 And that's it, because cell number three is excluded. 59 00:04:58,560 --> 00:05:06,270 Amazing, so here it is, we have all the cells right here that we wanted to extract and that's about 60 00:05:06,270 --> 00:05:06,500 it. 61 00:05:06,720 --> 00:05:16,140 Lets me let me just show you a bonus, a bonus manipulation that we will go over thoroughly in the next 62 00:05:16,140 --> 00:05:16,770 videos. 63 00:05:16,770 --> 00:05:19,260 But this is like an intro. 64 00:05:19,440 --> 00:05:21,270 So if you want to type. 65 00:05:24,400 --> 00:05:29,470 The length of the collection you can do it by. 66 00:05:30,660 --> 00:05:38,970 SDR, as always, this doesn't change, and then you have Lenna and here you have professions, this 67 00:05:38,970 --> 00:05:40,050 will give us the land. 68 00:05:40,070 --> 00:05:42,900 We already discussed it in previous videos. 69 00:05:42,900 --> 00:05:46,410 I think it was in this and this way. 70 00:05:46,440 --> 00:05:49,230 This will give us the number of items. 71 00:05:49,290 --> 00:05:51,600 OK, so this is the number of items we have. 72 00:05:51,600 --> 00:05:54,510 We have item number one, two, three and four. 73 00:05:54,780 --> 00:05:58,730 Again, as we discussed in previous lectures, it does not start from zero. 74 00:05:58,740 --> 00:06:00,690 It's not index number. 75 00:06:00,690 --> 00:06:02,850 It's not like the last number of index. 76 00:06:03,060 --> 00:06:06,420 It is number of items like in human language. 77 00:06:06,540 --> 00:06:07,870 We have four items. 78 00:06:08,820 --> 00:06:09,210 All right. 79 00:06:09,210 --> 00:06:12,840 This concludes our example part regarding basic. 80 00:06:13,020 --> 00:06:18,060 And see you in the next video where we discuss the advanced part of Toppo by by.