Installation
Nothing to install, but...
I'd recommend following along with Kyle's starter code which is modified from Rohan's starter code, since that is what I'll be referring to for this tutorial. Oh also, this is written in Tkinter, but Sockets also works great in PyGame and other modules.
Note: the starter code is a barebones template. So you can use it if you want (be sure to cite it) but don't feel restricted by how we chose to do things. For example, if you want messages to be received in keyPressed instead of timerFired, go for it! This guide is mainly to help you conceptualize sockets, so please don't feel like you have to use the template for your project.