58.4k views
18 votes
Write a program to insert an array of letters (word), then arrange the letters in ascending order and print this array after the arrangement.​

User Sohum
by
4.6k points

1 Answer

10 votes

Answer:

def split(word):

return [char for char in word]

word = input("Enter a word: ")

chars = split(word)

chars.sort()

sorted = ''.join(chars)

print(sorted)

Step-by-step explanation:

Here is a python solution.

User Ignasi Barrera
by
4.9k points