Skip to content

Commit cf18762

Browse files
authored
Update Day_24.md
1 parent d223ead commit cf18762

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Status/Day_24.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,19 @@ for i in tmp:
9191
print(i[0]+' '+str(i[1]))
9292
```
9393
---------------------
94+
```python
95+
'''Solution by: StartZer0'''
96+
97+
s = list(input())
9498

99+
dict_count_ = {k:s.count(k) for k in s}
100+
list_of_tuples = [(k,v) for k,v in dict_count_.items()]
101+
list_of_tuples.sort(key = lambda x: x[1], reverse = True)
102+
103+
for item in list_of_tuples:
104+
print(item[0], item[1])
105+
```
106+
-------------------------
95107

96108
# Question 102
97109
### **Question**

0 commit comments

Comments
 (0)