So you can actually create something with ActionScript outside of Flash?
Yup, in addition to Air, as Darkroot mentioned, you can also use the Flex SDK. I prefer it to Flash. I just write my code in a text editor and compile it with the SDK's compiler. It can be a bit tricky to use if you're used to coding on the timeline or if you want to work with animations that aren't sprite sheets.
You can also use FlashDevelop. I haven't ever really used it but I've heard from quite a few people that it's their Actionscript IDE of choice.
I agree with Darkroot on Python. It's dead simple and really quite fun. I'd highly recommend "Learn Python the Hard Way" by Zed A. Shaw. It's a book that you can read online for free, or you can buy a copy in print and/or pdf. He also offers a Python class (I think on Udemy). The Python tutorial on python.org is really good as well.