iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 14
0
自我挑戰組

我要在30天內好好學習python系列 第 14

第十四天 資料結構(2)

今天來介紹一下dictionary , dictionary最主要的特性就是,他可以用鍵值來查找想要的元素,在建立
dictionary的時候使用大括弧{}把元素包覆
https://ithelp.ithome.com.tw/upload/images/20181016/20112068WUcCUSLGar.jpg
https://ithelp.ithome.com.tw/upload/images/20181016/20112068UMeWIzhIZi.jpg

dictionary還有一個功能是可以把list轉成dictionary,只需要多一個變數就可以了
https://ithelp.ithome.com.tw/upload/images/20181016/201120681v7tgJ1nPt.jpg
https://ithelp.ithome.com.tw/upload/images/20181016/20112068xf3HDrrMtw.jpg

這個dictionary我覺得還滿難用的,還是list比較方便一點/images/emoticon/emoticon46.gif


上一篇
第十三天 資料結構(1)
下一篇
第十五天 Numpy(1)
系列文
我要在30天內好好學習python30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言