"""
文本类型: str
数字类型: int,float,complex
序列类型:list,tuple,range
映射类型:dict
套装类型:set,frozenset
布尔类型:bool
二进制类型:bytes,bytearray,memoryview
"""
x = 6
print(type(x))
x = "This is one sentence"
print(x)
print(type(x))
y = 2
print(y)
print(type(y))
z = 6.5
print(z)
print(type(z))
a = 2j
print(a)
print(type(a))
b = ["apple", "banana", "cherry"]
print(b)
print(type(b))
c = ("apple", "banana", "cherry")
print(c)
print(type(c))
x = range(6)
print(x)
print(type(x))
x = {"name": "tom", "age": 36}
print(x)
print(type(x))
x = {"apple", "banana", "cherry"}
print(x)
print(type(x))
x = frozenset({"apple", "banana", "cherry"})
print(x)
print(type(x))
x = True
print(x)
print(type(x))
x = b"Hello"
print(x)
print(type(x))
x = bytearray(5)
print(x)
print(type(x))
x = memoryview(bytes(5))
print(x)
print(type(x))
x = str("This is one sentence")
print(x)
print(type(x))
"""
1.下面的结果是什么类型?
(1) x = 5
print(type(x))
int 整型
(2) x = "Hello World"
print(type(x))
str 字符串
(3) x = 20.5
print(type(x))
float 浮点数
(4) x = ["apple", "banana", "cherry"]
print(type(x))
list 列表
(5) x = ("apple", "banana", "cherry")
print(type(x))
tuple 元组
(6) x = {"name" : "John", "age" : 36}
print(type(x))
dict 字典
(7) x = True
print(type(x))
bool 布尔类型
"""
|