how to order a list by the length of words fro longest to shortest
# Python code to sort a list without
# creating another list Use of sort()
def Sorting(lst):
lst.sort(key=len)
return lst
# Driver code
lst = ["rohan", "amy", "sapna", "muhammad",
"aakash", "raunak", "chinmoy"]
print(Sorting(lst))
# Should return ['amy', 'rohan', 'sapna', 'aakash', 'raunak', 'chinmoy', 'muhammad']