I need to count the number of words and the number of spaces of the text indicated below through defining a function in Python. I tried with the
split(" ") command but due to the text are in two different lines I don't know how to do it. Can somebody help me?
text1 = "A sentence is a group of words that makes complete sense, \n
contains a main verb, and begins with a capital letter."