String Compare Function In Python With Parameters