One method is to take the approach of just uninstalling the games and then trying to live with the withdrawal symptoms until you're over it (while working towards new projects). The other method is to do it over a period of time, while also slowly getting rid of all the distractions that get you to play games in the first place.
I find the second method easier to work with, although some are able to just flick an internal switch and stop one fine day. At the same time it's good to start working on your side projects by starting small (extremely small, whatever you're willing to agree with), and then increasing it over a period of time. I've found this method to help. You could start with something as small as just 5 mins of work per day, or a really small task for that day. Once you feel like you're making progress (no matter how small), you'll automatically find the incentive to focus on it more, and spend more time on it.
1. Do some research and look for a good book on python, or possibly a MOOC/set of videos.
2. Follow the content, make sure you understand the concepts. Don't just read the material, it's recommended to code what you're reading so you spend time understanding what you're coding.
3. Solve some exercises.
4. Once you've covered the fundamentals, go and start off with a project. Start with a small project, then create bigger ones.
Essentially, cover the fundamentals and understand them, then go ahead with a project. The real learning is in the projects you'll build as you'll find gaps in your knowledge that you'll cover on the way. But it's good to study the fundamentals so you have a starting point and aren't completely lost.
There are a lot of good books for an introduction to Python, "Automate the boring stuff"[1], "Think Python"[2], and many more. These two are actually available for free online. Someone here can probably recommend some better books or you can look up other recommendations online.
I find the second method easier to work with, although some are able to just flick an internal switch and stop one fine day. At the same time it's good to start working on your side projects by starting small (extremely small, whatever you're willing to agree with), and then increasing it over a period of time. I've found this method to help. You could start with something as small as just 5 mins of work per day, or a really small task for that day. Once you feel like you're making progress (no matter how small), you'll automatically find the incentive to focus on it more, and spend more time on it.