Skip to content

Commit 8b860cf

Browse files
authored
Update 23_sets_frozensets.py
Just added frozenset which is a built-in function in Python that takes an iterable object as input and returns an immutable frozenset object.
1 parent 801ee0e commit 8b860cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Basics/Exercise/23_sets_frozensets/23_sets_frozensets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
set1 = {1, 2, 3, 4, 5}
2-
set2 = {4, 5, 6, 7, 8}
1+
set1 = frozenset({1, 2, 3, 4, 5})
2+
set2 = frozenset({4, 5, 6, 7, 8})
33
print("Original sets:")
44
print(set1)
55
print(set2)

0 commit comments

Comments
 (0)