Previously, we built this list comprehension,
which iterates over this list and divides by 10
each item of that list. And it ignores only if
temp is different than -9999. So what happens
if temp is equal to that number? Well, the loop,
the list comprehension will ignore that value,
as you saw in the output, so that was the output.
So what if you want to put another value instead
of that. Let's say you want to put a 0 instead
of that negative number. In that case, if you
think you can just do else here, 0, you try
this out. So you will be wrong, because that will
produce a SyntaxError. When you have an if else
inside the list comprehension, the order of the
components is a bit different. You have to get for
temp in temps. So the loop has to be after the
conditional just like that. If you execute that,
you're going to get the expected results. So you
see the 0 there instead of -9999. So the
list comprehension this time goes like this. Give
me temp divided by 10, only if temp is different than
this number, else give me a 0, for temp in temps. So
always remember that if you have to do an if else
inside the list comprehension, the for loop goes
at the very end like that.
[Outro sound]