numlist append(valueaverage sum(numlistlen(numlistprint('average:'averagecodewe make an empty list before the loop startsand then each time we have numberwe append it to the list at the end of the programwe simply compute the sum of the numbers in the list and divide it by the count of the numbers in the list to come up with the average lists and strings string is sequence of characters and list is sequence of valuesbut list of characters is not the same as string to convert from string to list of charactersyou can use lists 'spamt list(sprint( [' '' '' '' 'because list is the name of built-in functionyou should avoid using it as variable name also avoid the letter "lbecause it looks too much like the number " so that' why use "tthe list function breaks string into individual letters if you want to break string into wordsyou can use the split methods 'pining for the fjordst split(print( ['pining''for''the''fjords'print( [ ]the once you have used split to break the string into list of wordsyou can use the index operator (square bracketto look at particular word in the list you can call split with an optional argument called delimiter that specifies which characters to use as word boundaries the following example uses hyphen as delimiters 'spam-spam-spamdelimiter '- split(delimiter['spam''spam''spam'