我的github

Python有6个序列的内置类型,但最常见的是列表和元组。

参考:https://www.runoob.com/python/python-lists.html

实例:

#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
list = []          ## 空列表
list.append('Google')   ## 使用 append() 添加元素
list.append('Runoob')
print list

 

posted on 2022-09-14 11:23  XiaoNiuFeiTian  阅读(31)  评论(0)    收藏  举报