The question you found is mainly discussing the difference between Python2 and Python3 since there is no argument end for print in Python2 (actually in Python2 print is not a function but a statement).
What does end=' ' in a print call exactly do? - Stack Overflow
The default value of end is \n meaning that after the print statement it will print a new line. So simply stated end is what you want to be printed after the print statement has been executed
The end=' ' is just to say that you want a space after the end of the statement instead of a new line character. In Python 2.x you would have to do this by placing a comma at the end of the print statement. For example, when in a Python 3.x environment:
Нигде не могу найти описание функций begin() и end(), для чего они нужны? Если можно напишите пример пожалуйста :)
c++ - Что делают функции begin () и end () - Stack Overflow на русском
For anyone stumbling here who googled "bash warning: here-document delimited by end-of-file", it may be that you are getting the warning: here-document at line 74 delimited by end-of-file ...type warning because you accidentally used a here document symbol (<<) when you meant to use a here string symbol (<<<). That was my case.
Premature end of file indicates your XML file was not complete, since your are using URL connection here, I suspect network issues. Best way to solve this issue is to capture this XML file using wireshark or TCP monitor kind of tools and then check if it is complete