Python Beginners Tutorial | Collections SETS | Basic Programming 7

There are 4 Collection data types in Python List | Tuple | Set | Dictionary List [] ordered | indexed | changeable | duplicates Tuple () ordered | indexed | unchangeable | duplicates Set {} unordered | unindexed | no duplicates Dictionary {K:V} unordered | changeable | indexed | no duplicates Code - Sets my_set = {“Chalk“, “Duster“, “Board“} print(my_set) for x in my_set: print(x) print(“Chalk“ in my_set) (“Pen“) print(my_set)
Back to Top