a_string = "cba" sorted_characters = sorted(a_string) a_string = "".join(sorted_characters) print(a_string) #output is abc