python nested inline if else