Use case statment instead of if and elif statments