One advice here better to use elif here. It will save a little time for branch judgement. But not a problem. :)