What is a Set in Python?

Question

Can you help me with this question

Answer ( 1 )

    0
    2025-02-26T02:36:19+00:00

    A set is an unordered collection of unique elements.

    • Mutable (can add/remove items)
    • Unordered (no indexing)
    • No duplicate values

    Example:

    my_set = {1, 2, 3, 4}
    print(my_set) # {1, 2, 3, 4}

Leave an answer