{"id":491154,"student_id":10,"content":"\"\"\"\n在 Python 程式語言中,字串 (String) 和串列 (List) 是不同的資料型態。\n\n字串是電腦用來表示一個句子的方式,\n是一種基的資料型態,用於儲存一系列字元。可以使用單引號 ' ' 或雙引號 \" \" 來定義字串。\n\n串列是一個櫃子可以儲存很多不同的資料,\n是一種可變的資料型態,可以儲存多個元素,且每個元素的資料型態可以不同。可以使用中括號 [ ] 來定義串列。\n\n試著執行底下兩個範例,並觀察結果\n\"\"\"\n\n# 變數 a 裡儲存了一個水果單字\na = 'orange'\nprint(a)\n\n# 變數 b 裡儲存了一個串列,裏面有 3 個水果單字\nb = ['lemon', 'orange', 'apple']\nprint(b)\n","created_at":"2023-02-07T15:26:00.130+08:00","updated_at":"2023-02-07T15:34:32.560+08:00","name":"字串 vs 串列","language":"python","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/491154/21b5cb8e84e4d8f498e8f6b88f77655a.jpg"},"parent_id":491149,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":116,"hashid":"yeysq3zjy","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":11157102,"file_name":"cloud.png","project_id":491154,"asset_id":302343,"created_at":"2023-02-07T15:26:00.136+08:00","updated_at":"2023-02-07T15:26:00.136+08:00"},{"id":11157103,"file_name":"bg.jpg","project_id":491154,"asset_id":302344,"created_at":"2023-02-07T15:26:00.138+08:00","updated_at":"2023-02-07T15:26:00.138+08:00"},{"id":11157104,"file_name":"calm.mp3","project_id":491154,"asset_id":302345,"created_at":"2023-02-07T15:26:00.139+08:00","updated_at":"2023-02-07T15:26:00.139+08:00"},{"id":11157105,"file_name":"koding.png","project_id":491154,"asset_id":302346,"created_at":"2023-02-07T15:26:00.141+08:00","updated_at":"2023-02-07T15:26:00.141+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦