我必须编写一个代码,将三个单词按字母顺序排列。我在执行此操作时遇到了麻烦。到目前为止,这就是我所拥有的。我在正确的轨道上吗?
def my_sort():
word1==input('type a word')
word2==input('type a word')
word3==input('type a word')
letter =0 #letter is first letter of each word. I know I have to compare each first letter of each word.