#Sorted function returns the string as a list which we are converting to a string again using join new_str=''.join(sorted(old_str))