python for in if else one line