1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
abs(10) a = abs(-100) print a m = max(1,2,3,4,5) print m print int('120') print int(123.12) print str(123) print bool(1) print bool(0) a = abs print a(-1) def (x): if not isinstance(x,(int,float)): raise TypeError('Bad operand type') if x>0: return x else: return -x print my_abs(99) c = 1 if c>18: pass
|
近期评论