def mod_5(x): return x % 5 print( max(100, 51, 14), max(100, 51, 14, key=mod_5), sep='\n', )
输出,可以看到这里调用了mod_5函数
100 14