Important Notice:

Course Content
Set Data Type in Python (Chapter-14) M3-R5
About Lesson

Set Data Type:-

               Python में set data type में elements का set होता है Python के set में हर एक element नया होता है और इन नए elements को change नहीं किया जा सकता है। Set में दिए हुए elements immutable होते है। लेकिन किसी method के साथ set के elements को add या remove किया जा सकता है Python Set एक unordered collection होता है।

               Set type के elements को represent करने के लिए { } का प्रयोग किया जाता है। और प्रत्येक element को (,) से separate किया जाता है।

Note:-

  1. Set is a class

  2. Set is mutable

  3. Set is not a sequence

  4. Set is iterable

  5. Indexing is not applicable to set object

  6. Set cannot have duplicate values

  7. Set does not guarantee to store values in the order of insertion

  8. Slicing operator is not applicable

  9. Concatenation (+) and Repetition (*) operator not supported in set

  10. Comparison operator (>, <, <=, <=, ==,!=) is supported in set. (Two set objects are equal if their elements are same, doesn’t matter the order of elements.)

 

 

 Set Data Type:-

               In Python, set data type contains a set of elements. Every element in Python’s set is new and these new elements cannot be changed. The elements given in a set are immutable. But the elements of the set can be added or removed with any method. Python Set is an unordered collection.                  { } is used to represent elements of Set type. And each element is separated by (,).

Note:-

  1. Set is a class

  2. Set is mutable

  3. Set is not a sequence

  4. Set is iterable

  5. Indexing is not applicable to set object

  6. Set cannot have duplicate values

  7. Set does not guarantee to store values in the order of insertion

  8. Slicing operator is not applicable

  9. Concatenation (+) and Repetition (*) operator not supported in set

  10. Comparison operator (>, <, <=, <=, ==,!=) is supported in set. (Two set objects are equal if their elements are same, doesn’t matter the order of elements.)

error: Content is protected !!