SET in Python

0
SET in Python:-


Set is a collection of a finite number of the element which contains unique values.

arr =  {12,12,23,34,45,67,12}
print(arr)

Set display output randomly.


SET PROGRAM:-

arr =  {12,12,23,34,45,67,12}
print(arr)
for i in arr:
    print(i)



Predefined method of Set:-


1  Intersection


2 union


3 add

4 remove

5 copy

6 difference


..................................................................



WAP to find the intersection of set elements without using intersect()?


WAP to find the max element in Set?


WAP to display set element in Sorted Order?


WAP to Display maximum prime number in the set?













Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)