A word chain is a list of words such that for each consecutive pair of words, the last letter in the first word is the same as the first letter in the second word. For example, the following list of animals forms a word chain: 'camel‘, 'leopard‘, 'dog', 'giraffe', 'elephant‘. Write a function is_word_chain that takes a list of wordsllist of strings] called my_1ist as parameter and returns True if the list contains a word chain and False otherwise. Your list should have at least 2 words.
Write a program clip}!r to
- test your function. t test your program with two lists of string, where one list represents a word chain and the
other is not.
- Copy the results to testing.txt.