代码示例:(标识:python_array_4)
python_array_4.py
cars = ["Porsche", "Volvo", "BMW"]

x = len(cars)

print(x)
运行结果: