在python如何创建集合

时间:2024-10-13 03:26:59

1、打开一个关于python的任意编辑器,如图所示:

在python如何创建集合

2、第一种方式格式为:集合变量 = {value01,value02,...},如图所示:

在python如何创建集合
在python如何创建集合

3、第二种方式,格式为:集合变量=set(value),如图所示:

在python如何创建集合
在python如何创建集合
© 手抄报圈