Sorting strings by length

Report a typo

Write a program to sort a list of strings from long to short ones. The input value is a list, the output should also be a list. For example, if the input is Emma Bill Thomas your program should return ['Thomas', 'Emma', 'Bill'].

Sample Input 1:

Emma Bill Thomas

Sample Output 1:

['Thomas', 'Emma', 'Bill']
Write a program in Python 3
string = input().split()
___

Create a free account to access the full topic