First off, you shouldn't just blindly have Python 2 on Linux. A lot of distributions these days don't need it and only install it for compatibility reasons. If the OS came pre-installed with it, keep it, but otherwise, don't go out of your way to install it unless you have some software that actually needs it. Some Linux systems don't even have it by default anymore (Arch for example).
Beyond that, as suggested in the comments, only install what versions you actually need. In other words, if you have no software using Python version X.Y, and the OS didn't automatically install it, don't have it installed on your system. This advice applies in general to almost any programming language though. More code translates to more possibilities for an attacker to exploit a bug.
Building on this advice with a real-world example:
On my Gentoo systems, I currently have Python 2.7, 3.6, and 3.7.
- I need Python 2.7 because I have a few packages that require AsciiDoc for their documentation, and that only works with Python 2.7.
- I need Python 3.6 because that's the primary version supported by almost all other code on my system (and in fact, by most of the Python related packages in Gentoo right now).
- I need Python 3.7 for new development work and testing purposes.
I could in theory also have Python 3.4 and 3.5 installed on these systems, but I don't because I have exactly zero software that needs either of them.