parsetable Parses HTML Table and printed flag in one line. Utilises Python commands: Removes new lines from the output and then replaces blank spaces! flag = "".join(text.splitlines()) print(flag.replace(" ", ""))