1 00:00:00,000 --> 00:00:08,394 This one here is a list and now it is a tuple. 2 00:00:08,395 --> 00:00:10,308 So a tuple is just like a 3 00:00:10,309 --> 00:00:13,790 list, but with parentheses, not square brackets. 4 00:00:15,410 --> 00:00:17,978 If you print it out, of course you'd 5 00:00:17,979 --> 00:00:20,900 get the same representation as in here. 6 00:00:20,901 --> 00:00:23,588 So 1, 4, 5, 1, 4, 5. 7 00:00:23,589 --> 00:00:27,228 However, the brackets, the parentheses is not 8 00:00:27,229 --> 00:00:30,818 the only difference between lists and tuples. 9 00:00:30,819 --> 00:00:33,586 In fact, this is just a difference in syntax. 10 00:00:33,587 --> 00:00:38,448 The real difference there is that tuples such 11 00:00:38,449 --> 00:00:42,624 as this one in here are immutable and 12 00:00:42,625 --> 00:00:45,790 lists such as this one 13 00:00:45,791 --> 00:00:48,966 [No audio] 14 00:00:48,967 --> 00:00:50,262 are mutable. 15 00:00:50,263 --> 00:00:55,962 What that means is that the list monday_temperatures2, 16 00:00:55,963 --> 00:00:58,772 you can add more items to 17 00:00:58,773 --> 00:01:02,750 the list using for example the append method. 18 00:01:03,330 --> 00:01:05,507 So if you check monday_temperatures 19 00:01:05,508 --> 00:01:08,638 now you get a list mutated. 20 00:01:08,639 --> 00:01:11,614 This mutability makes list very dynamic. 21 00:01:11,615 --> 00:01:14,136 You'll see later how when we do these 22 00:01:14,137 --> 00:01:17,372 batch operations and in each operation we are 23 00:01:17,373 --> 00:01:19,986 adding items to the list as we generate 24 00:01:19,987 --> 00:01:23,850 those items, those values with some functions. 25 00:01:23,851 --> 00:01:26,066 But this is not the case with tuples. 26 00:01:26,067 --> 00:01:29,470 If you try to append in a tuple, 27 00:01:29,471 --> 00:01:32,278 you'll get an error because the tuple doesn't 28 00:01:32,279 --> 00:01:34,780 actually have an append method at all. 29 00:01:35,550 --> 00:01:38,216 Likewise, it doesn't have a remove method, 30 00:01:38,217 --> 00:01:40,333 [No audio] 31 00:01:40,334 --> 00:01:42,800 like the list does. 32 00:01:42,801 --> 00:01:45,166 [No audio] 33 00:01:45,170 --> 00:01:47,754 So four is not there anymore. 34 00:01:47,755 --> 00:01:50,628 Tuples, however, have the advantage that they 35 00:01:50,629 --> 00:01:53,098 are a bit faster than lists. 36 00:01:53,099 --> 00:01:55,588 But you should think what to use. 37 00:01:55,589 --> 00:01:58,500 So whether to use lists or tuples, you should think 38 00:01:58,501 --> 00:02:02,996 if the array you are creating is going to be 39 00:02:02,997 --> 00:02:07,516 changed during the course of the program or not. 40 00:02:07,517 --> 00:02:11,516 So for now, I'm not going deeper into tuples and 41 00:02:11,517 --> 00:02:15,388 lists, but when we create these ten applications during the 42 00:02:15,389 --> 00:02:19,292 course, you will understand the main differences between the two 43 00:02:19,293 --> 00:02:22,630 by seeing how they work in real programs. 44 00:02:22,631 --> 00:02:26,633 [Outro sound]