Is it possible to be infected with malware/virus via a proxy?

I’m curious as to whether you can be infected with malware by using a proxy? I currently process data using Python but occasionally I encounter recaptcha, so I’m looking to implement proxy support.

The data processing is simply an experimental project. So of course my priority is the state of my computer and so I want to get a better insight of malware via proxies before I establish a connection with one via python, the connection would be made via TCP.

Also I’m not necessarily looking for a in-depth answer as I assume if this is possible there’s multiple scenarios, so just a simple yes/no and brief explanation would be great.