It really depends on how you want to implement the game. Java and Python both run primarily on the server, and can both be implemented to create desktop applications as well. Java can be run inside a browser as a service as well. If you are just starting with programming, I would honestly start out with Javascript, which can be run in the browser easily, requires no real setup, and will get most of the proper programming practices down before you move to other languages that require a higher learning curve or installation process. Do not start learning programming by trying to build a desktop application, get the basic stuff down like using loops and conditional statements before you worry about having to install things, instantiate dependencies, etc. or else you are going to drive yourself nuts trying to learn because there are a lot more things that can go wrong and you will not yet have the experience to know whether it is a problem with your code, a missing resource, or some other conflict. Javascript is also very similar to AS3 from Flash (they are both built on the EMCA specification), so if you are already somewhat familiar with actionscript it will not be a huge jump. You can also learn namespacing, object and variable scope, and a lot of other very useful things easily, and you can tinker with your code directly from the console in your browser to find bugs instead of having to do it in your IDE/editor and test the entire project over again each time you tweak something. Once you have some of the core skills down, I would move to a server side or compiled language at that point.