HTMLify
LeetCode - Sorting the Sentence - Python
Views: 217 | Author: abh
class Solution:
def sortSentence(self, s: str) -> str:
return " ".join([w[:-1] for w in sorted(s.split(), key=lambda e:int(e[-1]))])