The precise issue has by now been solved in preceding responses, so I'll address the overall idea of making use of conditionals inside of list comprehensions.So any if-else Management stream needs to be done within the expression evaluated earlier mentioned. Also since list comprehensions make a list, expression must be an expression which can be a