- 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.
推薦閱讀
- Facebook Application Development with Graph API Cookbook
- 國際大學生程序設計競賽中山大學內部選拔真題解(二)
- LabVIEW Graphical Programming Cookbook
- Getting Started with ResearchKit
- SQL Server 2016從入門到精通(視頻教學超值版)
- Getting Started with SQL Server 2012 Cube Development
- ASP.NET 3.5程序設計與項目實踐
- Swift細致入門與最佳實踐
- Python Data Structures and Algorithms
- 從零開始學Python網絡爬蟲
- Maker基地嘉年華:玩轉樂動魔盒學Scratch
- 跟戴銘學iOS編程:理順核心知識點
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- 數據分析與挖掘算法:Python實戰
- Learning Jakarta Struts 1.2: a concise and practical tutorial