1 00:00:00,000 --> 00:00:02,880 Previously, we built this list comprehension, 2 00:00:02,910 --> 00:00:05,850 which iterates over this list and divides by 10 3 00:00:05,880 --> 00:00:10,470 each item of that list. And it ignores only if 4 00:00:10,560 --> 00:00:14,250 temp is different than -9999. So what happens 5 00:00:14,251 --> 00:00:18,450 if temp is equal to that number? Well, the loop, 6 00:00:18,451 --> 00:00:21,120 the list comprehension will ignore that value, 7 00:00:21,630 --> 00:00:24,900 as you saw in the output, so that was the output. 8 00:00:25,320 --> 00:00:27,870 So what if you want to put another value instead 9 00:00:27,871 --> 00:00:30,510 of that. Let's say you want to put a 0 instead 10 00:00:30,511 --> 00:00:33,870 of that negative number. In that case, if you 11 00:00:33,871 --> 00:00:39,180 think you can just do else here, 0, you try 12 00:00:39,181 --> 00:00:41,880 this out. So you will be wrong, because that will 13 00:00:41,881 --> 00:00:45,540 produce a SyntaxError. When you have an if else 14 00:00:45,541 --> 00:00:49,020 inside the list comprehension, the order of the 15 00:00:49,050 --> 00:00:53,010 components is a bit different. You have to get for 16 00:00:53,040 --> 00:00:58,800 temp in temps. So the loop has to be after the 17 00:00:58,830 --> 00:01:04,800 conditional just like that. If you execute that, 18 00:01:04,830 --> 00:01:08,160 you're going to get the expected results. So you 19 00:01:08,161 --> 00:01:13,290 see the 0 there instead of -9999. So the 20 00:01:13,291 --> 00:01:16,110 list comprehension this time goes like this. Give 21 00:01:16,111 --> 00:01:20,220 me temp divided by 10, only if temp is different than 22 00:01:20,520 --> 00:01:26,460 this number, else give me a 0, for temp in temps. So 23 00:01:26,461 --> 00:01:29,160 always remember that if you have to do an if else 24 00:01:29,250 --> 00:01:32,040 inside the list comprehension, the for loop goes 25 00:01:32,041 --> 00:01:34,050 at the very end like that. 26 00:01:34,051 --> 00:01:37,800 [Outro sound]