1 00:00:00,540 --> 00:00:06,330 Welcome to another video of our Python listeners, and today we're going to talk about Python lists, 2 00:00:07,860 --> 00:00:14,970 a list in Python is an array of data strings or integers, and you can access these data using the name 3 00:00:14,970 --> 00:00:18,330 of the list you created and the number of the element. 4 00:00:19,590 --> 00:00:23,280 Let's create a small list with two strings and one integer. 5 00:00:43,280 --> 00:00:46,020 The first element in an array starts from zero. 6 00:00:46,490 --> 00:00:49,900 The second element is number one and so on. 7 00:00:51,020 --> 00:00:54,620 Let's access the first element of this array, which is string. 8 00:00:54,620 --> 00:00:55,130 Hello. 9 00:01:02,260 --> 00:01:03,550 What about the second element? 10 00:01:08,050 --> 00:01:15,540 Nice be careful if you access an element outside the scope of the array, which means it's not there, 11 00:01:16,180 --> 00:01:17,350 you would get an error. 12 00:01:18,880 --> 00:01:25,270 In this example, we only have three elements starting from zero to two, but we don't have element 13 00:01:25,270 --> 00:01:25,860 number three. 14 00:01:26,950 --> 00:01:29,410 Let's see what happens when we access that element. 15 00:01:34,300 --> 00:01:39,260 As you can see, we got an error list and it's out of range now. 16 00:01:39,670 --> 00:01:41,910 What if we want to add an element to our list? 17 00:01:42,580 --> 00:01:44,080 We can do that by using a pen. 18 00:01:45,310 --> 00:01:46,390 Let's add the string. 19 00:01:46,390 --> 00:01:46,990 Howdy. 20 00:01:47,230 --> 00:01:49,240 And it will become Illman number three. 21 00:01:59,050 --> 00:02:05,530 OK, how to remove the last element then we can use that by using the pop function. 22 00:02:13,570 --> 00:02:17,200 But how do we insert an element in a specific location in our list? 23 00:02:18,430 --> 00:02:24,940 We can do that by using the insert function and we need to provide the value we want to insert and the 24 00:02:24,940 --> 00:02:26,770 element number we want to insert that. 25 00:02:27,820 --> 00:02:32,050 Let's insert the string blue after the string word. 26 00:02:45,130 --> 00:02:49,220 Now, let's look through our list and print every element. 27 00:02:49,270 --> 00:02:49,960 One by one, 28 00:02:59,170 --> 00:03:03,550 we are going to use lists a lot later, so we need to get comfortable dealing with them. 29 00:03:04,960 --> 00:03:06,540 We have reached the end of this lesson. 30 00:03:06,850 --> 00:03:07,390 Thank you. 31 00:03:07,390 --> 00:03:08,470 And so you in the next one.