- Hands-On Data Science and Python Machine Learning
- Frank Kane
- 79字
- 2021-07-15 17:15:01
Dereferencing a single element
If you want to dereference a single element of the list you can just use the bracket like that:
y[1]
The output of the above code is as follows:
11
So y[1] will return element 1. Remember that y had 10, 11, 12 in it - observe the previous example, and we start counting from 0, so element 1 will actually be the second element in the list, or the number 11 in this case, alright?
推薦閱讀
- Data Visualization with D3 4.x Cookbook(Second Edition)
- JavaScript全程指南
- Instant 960 Grid System
- R的極客理想:工具篇
- 編譯系統透視:圖解編譯原理
- Hands-On Functional Programming with TypeScript
- MATLAB 2020從入門到精通
- 時空數據建模及其應用
- Python編程:從入門到實踐(第3版)
- HTML+CSS+JavaScript編程入門指南(全2冊)
- 平面設計經典案例教程:CorelDRAW X6
- SQL Server 2008中文版項目教程(第3版)
- Android Studio開發實戰:從零基礎到App上線 (移動開發叢書)
- WordPress Search Engine Optimization(Second Edition)
- Shopify Application Development