常用内置函数:round(): print(round(3.14),round(3.99)) print(round(3145.926,-2),round(413.575,2)) abs(): print(abs(-2),abs(-1),abs(0),abs(1),abs(2)) max().min().sum() print(max([1,2,3,4,5])) print(min([1,2,3,4,5])) print(sum([1,2,3,4,5])) 以下比较的是字符串中每个字符的asci