Skip to content

Commit b01d8f9

Browse files
authored
Merge pull request darkprinx#56 from Poonam-glitch/patch-2
Update Day 2.md
2 parents 54c7851 + 8851a76 commit b01d8f9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Status/Day 2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,16 @@ lst = input().split(',')
351351
lst.sort()
352352
print(",".join(lst))
353353
```
354+
#Solution by Poonam-glitch
355+
356+
```
357+
def my_func(e):
358+
return e[0]
359+
360+
my_list = input('Enter a comma separated string').split(",")
361+
my_list.sort(key=my_func)
362+
print(my_list)
363+
```
354364

355365
---
356366

0 commit comments

Comments
 (0)