this assignment statement has just one long stringfull of words separated by spaces and at the end of the string is split(method call the split(method evaluates to list with each word in the string as single list item the "splitoccurs wherever space occurs in the string it is easier to type the code using split(if you created it as list to begin withyou would have to type['ant''baboon''badger'and so onwith quotes and commas for every word for exampletry entering the following into the interactive shellsentence input(my very energetic mother just served us nachos sentence split(['my''very''energetic''mother''just''served''us''nachos 'the result is list of nine stringsone string for each of the words in the original string the spaces are not included in any of the items in the list you can also add your own words to the string on line or remove any you don' want to be in the game just make sure that spaces separate the words how the code works line defines the getrandomword(function list argument will be passed for its wordlist parameter this function will return single secret word from the list in wordlist def getrandomword(wordlist) this function returns random string from the passed list of strings wordindex random randint( len(wordlist return wordlist[wordindexline stores random index for this list in the wordindex variable you do this by calling randint(with two arguments the first argument is (for the first possible indexand the second argument is the value that the expression len(wordlist evaluates to (for the last possible index in wordlistlist indexes start at not if you have list of three itemsthe index of the first item is the index of the second item is and the index of the third item is the length of this list is but the index would be after the last index this is why line subtracts from the length the code on line will work no matter what the size of wordlist is now you can add or remove strings to wordlist if you like