摘要:
# 字典 # key:value # 布尔值列表字典不能作为key,报错,value什么都行 # 无序,可迭代 dic = { "fasd":"fads", "k1":"fdasfads" } # x = dic.values() # x = dic.keys() # x = dic.items() # print(x) # j = dic.fromkeys(['fds','...
阅读全文
posted @ 2017-05-15 17:51
法海降妖
阅读(108)
推荐(0)
编辑
摘要:
# 元组 # 元素不可修改,不可增加和减少,可迭代对象,元素的元素 tu = (33,55,66,99,23) #索引 # v = tu[0] # print(v) # >>>33 # 切片 # v = tu[2:3] # print(v) # >>>(66,) # # # 可以被for循环 # for item in tu: # print(item) # r = list(tu...
阅读全文
posted @ 2017-05-15 16:09
法海降妖
阅读(81)
推荐(0)
编辑