python實例 列表

#! /usr/bin/python # -*- coding: utf8 -*- #列表相似Javascript的數組,方便易用 #定義元組 word=['a','b','c','d','e','f','g'] #如何經過索引訪問元組裏的元素 a=word[2] print ("a is: "+a) b=word[1:3] print ("b is: ") print (b) # index 1
相關文章
相關標籤/搜索