0% found this document useful (0 votes)
2 views1 page

Set Data Type

Sets in Python are unordered, mutable collections of unique, hashable elements, defined using {} or the set() constructor. Key characteristics include the lack of defined order, the ability to add or remove elements, the requirement for unique elements, and the necessity for all elements to be immutable. Additionally, sets support mathematical operations such as union, intersection, and difference.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Set Data Type

Sets in Python are unordered, mutable collections of unique, hashable elements, defined using {} or the set() constructor. Key characteristics include the lack of defined order, the ability to add or remove elements, the requirement for unique elements, and the necessity for all elements to be immutable. Additionally, sets support mathematical operations such as union, intersection, and difference.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

✍ SET DATA TYPE ✍

- Set in python unordered, mutable collection of unique, hashable elements. sets


are defined with {} or set() constructor.
# 👀 Key characterstics
- Unordered :- Elements have no defined order
- Mutable : can add/remove elements
- Unique elements : No duplicate allowed
- Hashable elements : All elements must be immutable
- Mathematical operation: Supports union, intersection and difference

You might also like