A code snippet which accepts a word or a sentence from a user, and then sorts it, and displays the sorted list.

# An empty list

# A for loop to add whatever the user enters to the list
for a in (raw_input("Enter some words/letters to sort in alphabetical order: ")):

print sorted(sorter)