python for loop if statement one line