Skip to content

Commit a048d58

Browse files
committed
Feat: contains-duplicate Solution
1 parent 64e75e1 commit a048d58

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

contains-duplicate/oddong.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
a = [1, 2, 3, 5, 4]
2+
3+
a.sort()
4+
5+
print(a)
6+
print(set(a))
7+
print(type(set(a)))
8+
9+
convert_list_to_set = list(set(a))
10+
11+
print()
12+
print(a)
13+
print(convert_list_to_set)
14+
print()
15+
16+
if a == convert_list_to_set:
17+
print(True)
18+
else:
19+
print(False)

0 commit comments

Comments
 (0)