ramylan00
ramylan00 ramylan00
  • 15-01-2021
  • Computers and Technology
contestada

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

Respuesta :

tonb
tonb tonb
  • 15-01-2021

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)

Explanation:

Here is a python solution.

Answer Link

Otras preguntas

Hi how do you write the number 31 in Italian? Thanks need this answer tonight plz homework is due tomorrow
A grocery store receipt shows 5% state tax due on laundry detergent and a flower bouquet. Does it matter whether the tax is calculated on each separate item o
7a-3=3-2a I don't know how to solve this question
Which types of proteins help defend the body against foreign agents like bacteria?
The ordered pairs (0, -2), (1, 1), (2, 4), (3, 7), and (4, 10) represent a function.  What is a rule that represents this function?
Chiang picked 12 apples. She gave 1/6 of the apples to each of her 5 friends. How many apples did each friend get?
how do you write 2,049,000 in expanded form
Why is compromise an important part of democracy?
Which rational number is greater? — 0.76 or 0.76? And why?
what is 28.09 rounded to the nearest tenthvis