- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 74字
- 2021-07-02 14:00:25
Indexing, slicing, and matrices
Tuple indices work the same way as list indices. Values can be accessed using index. If you try to read or write an element that does not exist, you get IndexError. If an index has a negative value, it counts backward from the end of the list.
Now, we will create a tuple named cities and perform some index operations:
cities = ('Mumbai', 'Bangalore', 'Chennai', 'Pune')

推薦閱讀
- Android Wearable Programming
- LabVIEW 2018 虛擬儀器程序設計
- 潮流:UI設計必修課
- AWS Serverless架構:使用AWS從傳統部署方式向Serverless架構遷移
- 少年輕松趣編程:用Scratch創作自己的小游戲
- 算法基礎:打開程序設計之門
- PHP 編程從入門到實踐
- Learn Scala Programming
- C++ 從入門到項目實踐(超值版)
- Java程序設計
- Jenkins Continuous Integration Cookbook(Second Edition)
- Android開發:從0到1 (清華開發者書庫)
- Machine Learning in Java
- 開源項目成功之道
- Spring Security Essentials