[Python][筆記]資料類型 序對, 串列, 字典 - S7an Insights

Breaking

S7an Insights

生活 × 技術 × 分享 讓複雜的問題,有條理地解決。

2017年9月16日 星期六

[Python][筆記]資料類型 序對, 串列, 字典


  1. 序對(Tuple) - 不能指派新元素、可以當字典的key
    sample_Tuple = ('Baseball', 'basketball')
  2. 串列 - 可以指派新元素,但不能當字典的keysample_String = ['New York', 'TAIWAN', '20170916']
    • sample_string.append('xx')
    • sample_string.remove('xx')
  3. 字典
    sample_List = {'Mon':'騎車', 'TUE':'跑步','WEB':'READING'}

    • sample_string.remove

沒有留言:

張貼留言

問題沒有大小或好壞