列表的创建02

创建列表的两种方式:

# 编写人:Jaoany
# 开发时间:2021/7/22 18:01
''' 创建列表的方式一 '''
lst = ["hello", "world", 98]
print(lst)
''' 创建列表的方式二 '''
lst2 = list(['hello', 'world', 98])
print(lst2)

运行结果

本文来自博客园,作者:Jaoany,转载请注明原文链接:https://www.cnblogs.com/fanglijiao/p/15045485.html

原文地址:https://www.cnblogs.com/fanglijiao/p/15045485.html