I'm trying to add number of False in a list equivalent to a variable number, working if the variable is not 0. I'm trying to add a "else" statement if the variable is 0 but it's not working.
Here is what I tired :
floors = 5
blocked_floor = [False for i in range(floors) if (floors > 0) else False]
blocked_floor1 = [False for i in range(floors) if (floors > 0) else False for i in range(1)]
There are a lot of topics about that issue but I tried everything that was in, nothing worked. I have a synthax error on the "else".
Do you have any idea about the issue ?