program:s="Mystring"print(sorted(s))output:['M', 'g', 'i', 'n', 'r', 's', 't', 'y']
s="Mystring"
print(sorted(s))
output:
['M', 'g', 'i', 'n', 'r', 's', 't', 'y']