一、为什么需要列表
二、代码示例
a = 10 # 变量:存储的是一个对象的引用
lst = ["hello", "world", 98]
print(lst, type(lst), id(lst))
运行结果:
D:\Environment\Python\Python311\python.exe D:\Environment\PythonWorks\learnpython\马士兵Python\第6章_一字排开\P46_45.为什么需要列表.py
['hello', 'world', 98] <class 'list'> 2032786115904
Process finished with exit code 0