The program doesn’t know what header is. The only thing the program knows is that if we declare header=True, then it will return all the data excluding data[0] (the header row), and if we say header=False, then it will return the entire dataset (since there is no header row). We, as the coder using the function, would want to know ahead of time if the dataset contains a header so that we know whether or not to make header True or False appropriately in the function. (If we make a mistake and the data doesn’t really have a header row, we’re going to end up losing the first row of data when we don’t declare the header False!) I hope that makes sense!
This was confusing to me as well, I was operating under the impression that we need to create something that check swhether a header exists.
e.g. if data[0] is a string then there is a header and otherwise no.