- 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?
推薦閱讀
- Mastering Adobe Captivate 2017(Fourth Edition)
- 移動UI設計(微課版)
- Maven Build Customization
- 華為HMS生態與應用開發實戰
- Selenium Design Patterns and Best Practices
- INSTANT MinGW Starter
- Keras深度學習實戰
- Visual Basic程序設計
- MySQL入門很輕松(微課超值版)
- Instant Debian:Build a Web Server
- Java Web從入門到精通(第3版)
- Django 5企業級Web應用開發實戰(視頻教學版)
- 區塊鏈架構之美:從比特幣、以太坊、超級賬本看區塊鏈架構設計
- Drupal 8 Development:Beginner's Guide(Second Edition)
- Getting Started with JUCE