Question: Please download the words1.txtfile from the attachment and then create a Pythonfunction that takes a text file as inputand returns the number of words containedin the text file.

Expected output:

10

Hint:Create a function that takes a file path as input, reads the file, splits the content, and counts the items of the split output.