Tag archives: Set

RSS feed of Set

Python set

1.Method for creating a set

 1)s={1,"python"}
 2)s=set("python") or s=set([1,"python"])
   ps. set to list: 
                   lst=list(s)
       list to set(can remove duplicate elements from the set):
                   s=set([1,"python"])  
       Create an immutable set in "frozenset"

2.Common method of set

 1)add 
    eg.
    b ...

Continue reading