python make list if else