1 00:00:07,910 --> 00:00:14,160 It's awkward and error-prone to use slicing to delete things out of a list. 2 00:00:14,160 --> 00:00:20,010 So, Python gives us a special operator to do that it's called the delete operator, del. 3 00:00:20,010 --> 00:00:24,225 In this case, in this code we're creating a list called 4 00:00:24,225 --> 00:00:28,620 a with three items in it: one, two and three. 5 00:00:28,620 --> 00:00:33,700 And then we're calling the del operator to remove item one. 6 00:00:33,700 --> 00:00:36,525 So, let's see this in CodeLens. 7 00:00:36,525 --> 00:00:46,570 We first create the list and then a square bracket one refers to this position, 8 00:00:47,210 --> 00:00:53,750 and when we delete it the value three is now going to move 9 00:00:53,750 --> 00:01:00,300 up into position one and we'll end up with just one and three in our list. 10 00:01:01,130 --> 00:01:07,490 Now we've just got one and three and we can not just delete a single item, 11 00:01:07,490 --> 00:01:10,650 we can delete a whole sequence of items. 12 00:01:11,210 --> 00:01:15,060 Here we have a list: a, b, c, d, 13 00:01:15,060 --> 00:01:19,470 e and f. We're going to start at position one, 14 00:01:19,720 --> 00:01:24,905 go all the way up to but not including position five. 15 00:01:24,905 --> 00:01:28,220 Now it's a list, square bracket one, 16 00:01:28,220 --> 00:01:32,135 colon five and that's all going to be deleted. 17 00:01:32,135 --> 00:01:39,450 So, do that and we're left with just a and f.