# L-10 MCS 260 Wed 10 Sep 2007 sort words # # This program shows intrinsic operations # on strings and lists, to sort words, # given as a raw input string by the user. # s = raw_input('Give words : '); L = s.split() # spaces separate the words L.sort() # sort the list alphabetically s = ' '.join(L) # join the sorted list print 'Sorted words :' , s