- Matplotlib 2.x By Example
- Allen Yu Claire Chung Aldrin Yim
- 103字
- 2021-07-02 19:34:32
List
List is a basic Python data type for storing a collection of values. A list is created by putting element values inside a square bracket. To reuse our list, we can give it a name and store it like this:
evens = [2,4,6,8,10]
When we want to get a series in a greater range, for instance, to get more data points for our curve of squares to make it smoother, we may use the Python range() function:
evens = range(2,102,2)
This command will give us all even numbers from 2 to 100 (both inclusive) and store it in a list named evens.
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- Kali Linux Web Penetration Testing Cookbook
- 垃圾回收的算法與實現
- 微服務設計原理與架構
- 青少年美育趣味課堂:XMind思維導圖制作
- Python編程與幾何圖形
- C語言程序設計
- R數據科學實戰:工具詳解與案例分析
- Magento 2 Beginners Guide
- 交互設計師成長手冊:從零開始學交互
- 城市信息模型平臺頂層設計與實踐
- R語言:邁向大數據之路
- Python AI游戲編程入門:基于Pygame和PyTorch
- Prezi Cookbook
- Beginning Application Development with TensorFlow and Keras