📜  python代码示例中set和list的区别

📅  最后修改于: 2022-03-11 14:45:46.357000             🧑  作者: Mango

代码示例1
'''
In python, a list is a collection of values in a specific order.
There can be several times the same value
[4,8,9,5,4,1,3,4] is a valid list in python

In a set, all values has to be unique.
It is better to use sets compared to lists as much as possible,
because of its speed to retrieve data and space memory economy.
Diferent methods are available for sets and lists.
I will let you discover them on this well-done website : 
https://www.datacamp.com/community/tutorials/sets-in-python
'''