0% found this document useful (0 votes)
20 views

8) Python Sets

The document provides instructions for writing Python programs to perform operations on sets such as creating, adding/removing elements, intersections, unions, differences, subsets, copying, clearing sets, using frozensets, finding maximum/minimum values and length of sets.

Uploaded by

hasibsakina456
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

8) Python Sets

The document provides instructions for writing Python programs to perform operations on sets such as creating, adding/removing elements, intersections, unions, differences, subsets, copying, clearing sets, using frozensets, finding maximum/minimum values and length of sets.

Uploaded by

hasibsakina456
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PYTHON SETS

1. Write a Python program to create a set.

2. Write a Python program to iteration over sets.

3. Write a Python program to add member(s) in a set.

4. Write a Python program to remove item(s) from set

5. Write a Python program to remove an item from a set if it is present in the set.

6. Write a Python program to create an intersection of sets.

7. Write a Python program to create a union of sets.

8. Write a Python program to create set difference.

9. Write a Python program to create a symmetric difference.

10. Write a Python program to issubset and issuperset.

11. Write a Python program to create a shallow copy of sets.

PYTHON 8802551718/9990951718 SETS


PYTHON SETS

Note : Shallow copy is a bit-wise copy of an object. A new object is created that has
an exact copy of the values in the original object.

12. Write a Python program to clear a set.

13. Write a Python program to use of frozensets.

14. Write a Python program to find maximum and the minimum value in a set.

15. Write a Python program to find the length of a set.

PYTHON 8802551718/9990951718 SETS

You might also like