python定义空数组
作者:野牛程序员:2023-12-06 08:48:59python阅读 2625
在Python中,通常使用术语 "列表" 来表示动态数组。
# 定义一个空列表 my_list = [] # 向列表添加元素 my_list.append(1) my_list.append(2) my_list.append(3) # 打印列表 print(my_list)
野牛程序员教少儿编程与信息学奥赛-微信|电话:15892516892

- 上一篇:python append函数
- 下一篇:python判断大小写字母