0

i wanna tackle a real world problem...its described below.....

i wanna make the user input a list of guests....then these names would be entered in a list ....the list would be sorted and then given back to the user....how can i code a program which could do these things ...plz send me the solution using python..... morever i want more such real world problems to solve.....where could i get them with solution....

15th Apr 2018, 10:04 AM
PRO
PRO - avatar
7 Answers
0
sorted how?
15th Apr 2018, 10:07 AM
Obbu
Obbu - avatar
0
alphabetically
15th Apr 2018, 10:12 AM
PRO
PRO - avatar
0
if you enter all the guests using their first name only eg.ben and not ben smith then you could do ( it also has to all be on the same line) list = sorted(input().split()) and then just print it
15th Apr 2018, 10:22 AM
Obbu
Obbu - avatar
0
sorry...i didnt get it....plz type in the entire solution...
15th Apr 2018, 10:24 AM
PRO
PRO - avatar
0
list = sorted(input().split()) print (*list) input: ben terry john output: ben john terry
15th Apr 2018, 10:30 AM
Obbu
Obbu - avatar
15th Apr 2018, 10:47 AM
PRO
PRO - avatar
0
oh...i m very sorry....its working properly...thanks a lot
15th Apr 2018, 10:48 AM
PRO
PRO - avatar