lesson2-python3数据类型

1、数字

int整型

2、布尔值

1或0,真或假

3、字符串

>> "Hello World!"

4、列表

list

>> li = ['a','b','c',1,2,{a}]
['a', 'b', 'c', 1, 2, {10}]

5、元组

>> tp = (11,22,'1',{a},[a,b,c])
(11, 22, '1', {10}, [10, 20, 10])

6、字典

>> st = {"name":"Bobs", "age":12}
{'age': 12, 'name': 'Bobs'}

猜你喜欢

转载自blog.csdn.net/anny0001/article/details/83833575