1 00:00:00,000 --> 00:00:01,900 [no audio] 2 00:00:01,900 --> 00:00:03,000 Hi friends, here we are 3 00:00:03,000 --> 00:00:07,000 going to discuss about data structures of Python. 4 00:00:07,000 --> 00:00:10,900 So before entering into this concept, right already we know 5 00:00:10,900 --> 00:00:12,500 what is a variable in Python. 6 00:00:13,800 --> 00:00:18,400 Right. So variables are used to store some data. Even data 7 00:00:18,400 --> 00:00:23,800 structures are also variables, and they are used to store data but 8 00:00:23,800 --> 00:00:26,000 the data is collection of data. 9 00:00:26,700 --> 00:00:30,000 Let me explain that to you on my command line. 10 00:00:31,700 --> 00:00:33,299 So let me enter into my python. 11 00:00:33,800 --> 00:00:36,600 So, you know normal variables like 'x=5', 12 00:00:37,100 --> 00:00:40,500 then I can say the value of 'x' is 5, and I can see with the 13 00:00:40,500 --> 00:00:45,500 help of 'print(x)', right. Now sometimes 14 00:00:45,500 --> 00:00:49,600 you need to define a number of variables. Instead of defining 15 00:00:49,600 --> 00:00:50,700 number of variables, 16 00:00:50,700 --> 00:00:53,100 what I will do is I will take only one variable, 17 00:00:53,100 --> 00:00:58,000 let's say 'my_values', you can take like 'xyz' also, your 18 00:00:58,000 --> 00:01:00,700 variable name but I am taking 'my_values=', 19 00:01:00,700 --> 00:01:13,900 [no audio] 20 00:01:13,900 --> 00:01:16,900 like you can take any type of data. 21 00:01:17,000 --> 00:01:20,900 You can represent your data inside of, suppose your square 22 00:01:20,900 --> 00:01:24,500 brackets with commas separated values and then you can assign 23 00:01:24,500 --> 00:01:27,600 the result into some variable. Now here, 24 00:01:28,900 --> 00:01:33,000 here 'x' is a variable and 'my_values' is also a variable, but 25 00:01:33,000 --> 00:01:36,300 there is a small difference between these two. That is 'x' is 26 00:01:36,300 --> 00:01:39,900 a normal variable and which is used to hold only one single 27 00:01:39,900 --> 00:01:45,600 value. Now I have a list, list of values. 28 00:01:46,500 --> 00:01:50,300 I stored this list of values into this variable, right? 29 00:01:50,500 --> 00:01:54,500 I collected collection of data and I stored that data into 30 00:01:54,500 --> 00:01:57,600 one variable called 'my_values'. Now here 'my_values' is also 31 00:01:57,600 --> 00:02:04,200 a variable but it is storing multiple data. Now this 32 00:02:04,200 --> 00:02:05,400 is called data structure. 33 00:02:05,400 --> 00:02:07,500 [no audio] 34 00:02:07,500 --> 00:02:10,900 Right. So guys, there is not much difference between your normal 35 00:02:10,900 --> 00:02:13,300 variable and data structure variable, both are variables. 36 00:02:13,300 --> 00:02:16,500 The only thing is, your normal variable is able to hold one 37 00:02:16,500 --> 00:02:20,000 value, but your data structure variable is able to 38 00:02:20,000 --> 00:02:23,200 hold multiple values, right? That's it. 39 00:02:23,300 --> 00:02:26,600 Other than that nothing is there. But how you are going to 40 00:02:27,200 --> 00:02:30,000 structure your data, how you are going to store your data 41 00:02:30,000 --> 00:02:31,100 into your variable, 42 00:02:31,200 --> 00:02:34,500 what are the symbols you are using, based on this we have different 43 00:02:34,500 --> 00:02:36,700 types of data structures with your Python. 44 00:02:37,300 --> 00:02:40,500 Right. Let me start that. First thing that data structures are used 45 00:02:40,500 --> 00:02:44,700 to store a collection of data. That collection of data may 46 00:02:44,700 --> 00:02:51,600 be pure integers, pure float, right, or pure string numbers, 47 00:02:51,600 --> 00:02:55,500 string values, or maybe combination of all, no problem. 48 00:02:55,700 --> 00:03:00,100 You can store any type of data, combination of any type of 49 00:03:00,100 --> 00:03:02,500 data you can store into your data structure. 50 00:03:02,500 --> 00:03:04,500 [no audio] 51 00:03:04,500 --> 00:03:08,200 Right. Then, there are four built-in data structures with 52 00:03:08,200 --> 00:03:11,400 your Python, right. Built-in means by default 53 00:03:11,400 --> 00:03:12,900 you have these data structures. 54 00:03:13,600 --> 00:03:16,700 So based on some modules, you may get some other data structures 55 00:03:16,700 --> 00:03:17,900 as well. Suppose if you go 56 00:03:17,900 --> 00:03:22,100 with arrays modules, you have some array data structure. 57 00:03:23,200 --> 00:03:26,100 Okay, as of now by default with your Python you are getting 58 00:03:26,800 --> 00:03:30,200 these are the four different data structures with your Python. 59 00:03:30,200 --> 00:03:33,100 They are by default you have with your Python. 60 00:03:33,100 --> 00:03:37,100 [no audio] 61 00:03:37,100 --> 00:03:42,000 Okay. Now 'List', you have to represent with square brackets, 62 00:03:42,000 --> 00:03:44,600 I mean you have to write your data inside of this. 'Tuple', 63 00:03:44,900 --> 00:03:47,800 while writing your data you have to use parentheses. 'Dictionary', 64 00:03:48,100 --> 00:03:50,700 you have to write your data with curly braces with key-value 65 00:03:50,700 --> 00:03:51,800 pair representation 66 00:03:51,800 --> 00:03:57,300 like your dictionary book. 'Set', sets are represented with curly braces, 67 00:03:57,700 --> 00:04:01,500 but values are like 'List' and 'Tuple'. But there is some unique 68 00:04:01,500 --> 00:04:03,400 property with sets, we will see them. 69 00:04:04,300 --> 00:04:08,400 So guys, these are the four data structures, and as an 70 00:04:08,400 --> 00:04:10,800 automation engineer you should be good with first three 71 00:04:10,800 --> 00:04:11,800 data structures. 72 00:04:14,400 --> 00:04:18,899 Right. And we will see about each data structure separately, 73 00:04:19,100 --> 00:04:20,500 okay, in later videos. 74 00:04:20,800 --> 00:04:24,300 So as of now you have to remember there are four data structures, 75 00:04:25,000 --> 00:04:28,800 right? All data structures are used to store multiple data 76 00:04:28,800 --> 00:04:30,900 or collection of data, right? 77 00:04:30,900 --> 00:04:32,500 That is the purpose of data structures. 78 00:04:32,800 --> 00:04:35,200 And finally you have to remember that data structures are 79 00:04:35,200 --> 00:04:36,500 also variables. 80 00:04:37,500 --> 00:04:39,000 Right. Okay guys, 81 00:04:39,000 --> 00:04:40,400 thank you for watching this video. 82 00:04:40,400 --> 00:04:48,384 [no audio]