Question #180247

Write a program that will sort a list of strings (names of person) enter by the user given the value of n names.


Expert's answer

n = int(input('How many names?'))

ls = []
for j in range(n):
   wrk = input('{}) '.format(j+1))
   ls.append(wrk)

ls.sort()
print(ls)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS