Yes and no.
If you create a plugin, you can indeed run the code from Sublime's console and interact with Sublime's API. That's the console's intended purpose.
If you just want to code a python program in general, you'd use the build command to run it off your system's python (which you need to install separately). If you were creating an Erlang program, you'd be launching the Erlang compiler, etc. You just happen to be coding in Python, but that's an accident; nothing to do with Sublime.
Hope that helps!