If you're referring to the version number of python, the interactive shell will tell you as part of it's startup description if you run it from the command line. If you're referring to any file at all, I don't know a general way to do it. A given module or program might implement a way, though.
Comment