set: Similarly dict, is a set of key is not stored value
essentially: unordered and no duplicate elements
1. Create a set
Create a list or set need dict tuple or as a set of inputs, repeating elements in the set will be automatically filter
2. Add the Add ()
3. insert update ()
insert the whole list, tuple, string, breaking insert
4. remove remove ()
delete elements which to write the value of which element
5. the traversal
set is no index
6. and set the intersection of two sets and
7. type conversion
(1) list converted into set
(2) converted into tuple set
(. 3) set to turn List
8.list deduplication
python study notes thirteen (set)
Guess you like
Origin blog.csdn.net/weixin_38324954/article/details/95062511
Recommended
Ranking