>>> re.findall(r'<label>\s*<input type=\"(\w+)\"\s*.+?value=\"(\d+)\">(.+?)\/label', content, re.MULTILINE | re.DOTALL)
[('radio', '55', '\n a. XXXXXXXXXXX <br>\n\nb. ZZZZZZZZZ<br>\n\nc. MMMMMMMMM<br>\n\nd. YYYYYYYYYYY<br>\n\ne. AAAAAAAAA\n <'), ('radio', '56', '\n a. XXXXXXXXXXX<br>\n\nb. MMMMMMMMM<br>\n\nc. YYYYYYYYYYY<br>\n\nd. ZZZZZZZZZ<br>\n\ne. AAAAAAAAA\n <'), ('radio', '57', '\n a. XXXXXXXXXXX<br>\n\nb. MMMMMMMMM<br>\n\nc. YYYYYYYYYYY<br>\n\nd. AAAAAAAAA<br>\n\ne. ZZZZZZZZZ\n <')]
ValueError: Cannot serialize function: lambda
A thread can be flagged as a “daemon thread”. The significance of this flag is that the entire Python program exits when only daemon threads are left.
There is a “main thread” object; this corresponds to the initial thread of control in the Python program. It is not a daemon thread.
str(bytes) дает их строковое представление, а не текст. Либо response.text, либо bytes.decode('utf-8')