python one liner if else assignment