Decrypt String from Alphabet to Integer Mapping LeetCode solution in Python

1
class Solution:
2
def freqAlphabets(self, s: str) -> str:
3
for i in range(26, 0, -1):
4
s = s.replace(str(i) + "#" * (i > 9), chr(96 + i))
5
return s

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0