Websockets, or webservers?
If I wanted to make a game in python that’s text bassed, and I wanted to be able to play with someone else, would it be better to use a web server or websocket to communicate data?
Websockets are quite worth it. That said, it really depends. If your game periodically sends data, you could always go for long polling (AJAX requests periodically).
Web sockets allow connections between the server and the client without having to send additional headers each time a message is sent.
Websockets are most of the time used for games, so yes I would definitely recommend websockets.