Toggle Function In Python With Parameters Definition