首页 > 编程语言 > 详细

python之数据六种类型

时间:2018-05-07 13:13:21      阅读:192      评论:0      收藏:0      [点我收藏+]

数据类型里面的是元素

元素左边从0开始,右边从-1开始

 

可变数据类型

list

(123,dfjk)

 

dictionary

 

不可变数据类型

tuple

(dkjf,123)  

 

set

[sdlkf,123]

 

number

数值四种类型:int,float,bool,complex      

>>>a, b, c, d = 20, 5.5, True, 4+3j
>>> print(type(a), type(b), type(c), type(d))
<class ‘int‘> <class ‘float‘> <class ‘bool‘> <class ‘complex‘>

string

str = Runoob

(str[1:-1])

 

python之数据六种类型

原文:https://www.cnblogs.com/capable/p/9001959.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!