I would recommend you using requests
https://github.com/kennethreitz/requests package.
But your question looks like an assignment which shall teach you how is http working on TCP communication level. In such case I would recommend you
- learn using http protocol over telnet or netcat
- then learn TCP communication by Python and repeat, what you already know by telnet