![](https://s3-ap-southeast-1.amazonaws.com/admin.firelab.cc/wp-content/uploads/sites/3/2020/05/11102754/White-and-Green-Classic-Health-Facebook-Cover-7.png)
前言 什麼是元組? 元組的使用與列表相似,不同之處在於元組是不可修改的,元組使用圓括號( ),而列表使用中括弧。 大綱 定義元組 常用操作 一.定義元組 1. 使用逗號的方法: https://gist.github.com/Celia-code/0258748256705e006d27f2b8cd75129a 2. 使用圓括號的方法: https://gist.github.com/Celia-code/41a5d8e11450757f92269a2c0ad49fb2 3. 使用tuple函數: 範例:將一列表轉換為元組 https://gist.github.com/Celia-code/e36efa69ab3bf26aa5e85512a9a88439 4. 定義只有一個元素的元組:…
![celia](https://s3-ap-southeast-1.amazonaws.com/admin.firelab.cc/wp-content/uploads/sites/3/2020/02/21112807/4C244D80-E531-41EF-838E-DA08D751E0CE-100x100.jpg)
celiaMay 11, 2020