pyhon assert and if statement