It's not as simple as just copy and pasting.
First, you probably don't have access the source code, unless it's an open source game. If it's not, then there's no way getting the code (at least not legally), unless you contact the developers. Games are normally distributed compiled and built, so the source code is not available to the public, unless of course it's open source.
If you do manage to get the code and the game is written in python, then sure you can copy and paste it, but you're also going to have to import all the dependencies.
In short, it's probably not possible, unless it's an open source game and the code might be available on GitHub.
Also, it the title related to the post in any way?