在python 中怎样新建一个数组?

2026-02-16 23:13:18

1、首先打开这个pycharm这个编辑器!

在python 中怎样新建一个数组?

2、写上自己的备注。

在python 中怎样新建一个数组?

3、然后定义一个数组,用[]来表示数组,里面放元素,用逗号隔开。

names=["luohui","luolin","lili","alex","zhangsan"]

在python 中怎样新建一个数组?

4、将这个数组打印出来!

在python 中怎样新建一个数组?

5、选择窗口中的“run”->"run"

在python 中怎样新建一个数组?

6、选择要运行的文件

在python 中怎样新建一个数组?

7、最后运行文件

在python 中怎样新建一个数组?

猜你喜欢