💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 基本类型 ``` Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> type(1.111) <class 'float'> >>> type(11) <class 'int'> >>> type(1+1) <class 'int'> >>> type(1+1.001) <class 'float'> >>> type(1*1) <class 'int'> >>> type(1*9.01) <class 'float'> >>> type(2/2) <class 'float'> >>> type(2//2) <class 'int'> >>> 2/2 1.0 >>> 2//2 1 >>> 1//2 0 >>> 1/2 0.5 >>> ``` > 注意:单双杠和双双杠的区别: >> 单斜杠:除法,但是会自动转换为`浮点型`,eg:`2/2 = 1.0` >> 双斜杠:整除,只会保留整数部分,eg:`2//2 = 1`