value = 1
print(value) # 数字
print(type(value))
value = 'v'
print(value) # 字符
print(type(value))
value = "hello world"
print(value) # 字符串
print(type(value))
print("===============元祖================")
value = (1,2)
print(value) # 元祖 tuple
print(value[0])
print(value[1])
print(type(value))
for val in value:
print(val)
print("===============列表================")
value = [1,2]
print(value) # 列表 list
print(value[0])
print(value[1])
print(type(value))
for val in value:
print(val)
print("===============字典================")
value = {1,2}
print(value) # 字典 dict
value = {"name":"hahah","age":12}
print(value) # 字典是不能使用索引位置访问的。
print(value)
print(type(value))
for val in value: # for 打印出来key 没有value
print(val)
网友评论