Diff Function In Python With Parameters