This function takes a string as input and rearranges words in the string so that they are sorted alphabetically.
rearrange_string(str)A character string containing words separated by underscores.
A character string with the words sorted alphabetically and separated by underscores.