listOfWords = input('List of Word: ').split() listOfInts = [] for i in range(len(listOfWords)): listOfInts.append(len(listOfWords[i])) print ("List of wordlength:"+str(listOfInts))