Skip to content

Commit d1df671

Browse files
Update Day 3.md
1 parent 49c6ab7 commit d1df671

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Status/Day 3.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ word = sorted(list(set(input().split()))) # input string splits ->
6464
print(" ".join(word))
6565
```
6666

67+
**OR**
68+
inp_string = input("Enter string: ").split()
69+
out_string = []
70+
for words in inp_string:
71+
if words not in out_string:
72+
out_string.append(words)
73+
print(" ".join(sorted(out_string)))
74+
6775
---
6876

6977
# Question 11

0 commit comments

Comments
 (0)