Workout #8: Sorting a String

Sep 22, 2021

Write a function, strsort, that takes a single string as its input and returns a string. The returned string should contain the same characters as the input, except that its characters should be sorted in order, from the lowest Unicode value to the highest Unicode value. For example, the result of invoking strsort(‘cba’) will be the string abc.

TRY IT YOURSELF

ANSWER

https://colab.research.google.com/drive/18-i2TIGqC8fTZdZq4iJkZMPBIzGBpzfP?usp=sharing

--

--

Abish Pius
Abish Pius

Written by Abish Pius

Data Science Professional, Python Enthusiast, turned LLM Engineer

No responses yet