Python~字典

if not isinstance(x, (int, float)):
        raise TypeError('bad operand type')
 

range()

raw_input(‘birth’)返回字符串

函数

abs()

cmp():

(1,2) (1,1) (2,1)
-1 0 1

数据类型转换:

int(‘123’) str(1.23)  
int(12.23 bool(1)true  
float(‘12.34’) bool(‘’) false  
     
     
     
     
     
原文地址:https://www.cnblogs.com/lynclynn/p/5312611.html