I suggest if you'll be learning Python, learn 3.0, since it is incompatible with 2.x and is the latest. Better learn something new than learn something old and have to learn it again once deprecated.
I don't mind Python but it lacks stuff like multiple inheritance, templates, typecasting... C++ is pretty much my choice.
That's because templates/generics and typecasting are only needed by strong, statically typed languages like C++. They're more like kludges than features. The right way to implement a strongly typed language is to have the compiler figure out what type everything is based on context, a feature called "type inference" and found in languages like Haskell and ML. Then you don't need kludges like templates to write generic functions and data types.
Also, Python does support multiple inheritance, albeit not in the most vigorous manner. But then, you also get better support for a variety of other paradigms like functional programming and much cooler features like list comprehensions, anonymous functions, and some support for lazy evaluation. You also get lists, hashes, strings, and tuples built into the language itself, rather than tacked on as an afterthought in a library full of leaky abstractions (i.e. the C++ string class and STL). Python's standard library is also much better for short, one-off programs and tools, since it includes so much functionality in a single, well-documented place.
Really, the only reason to love C++ is for performance reasons, which is why most serious game development is done using it. I mean, the only alternative in a lot of cases where you use C++ is using either assembly or C, and most people don't have the discipline and knowledge to write good, manageable C code.
But as always, it's more personal preference than anything when you write your own code. I've written web applications in C.
Hmm... Suppose I have a few:
- Get somewhat good at Chess
- Start learning C and Python
- Fill my free time with more meaningful activities
- Use my abilities to do something worthwhile for others
If you learn C, also learn assembly language alongside it. That's because unlike most "high-level" languages, C doesn't do very much to abstract you away from the machine, so things like pointers and strings won't make sense unless you can break it down into assembly and understand how it works and why.
Really, C is just a portable way to write low-level code, which is nice if you want the ability to take complete advantage of the hardware you're using. A lot of libraries and APIs on Windows, Mac, and UNIX-like systems are also written in C, so you can do pretty much anything with it, but those same libraries are easy to wrap and use in pretty much any other language, to include Python. That's just one of those personal choices though. Here's a tip though: C is definitely a lot more fun if you surround yourself with good libraries and debugging tools and do a little meta-programming/code generation.
Also, if you learn C++ afterwards, don't even think of it in terms of C. Approach it as a new language.
And if you do want to learn C++ later, I suggest learning Smalltalk before learning C++. You'll learn real Object Oriented programming instead of the half-assed stuff you find in most C++ books, which will make you that much better when you learn C++, because you'll know how Object Oriented programming was really meant to be done.
Then just approach C++ as an attempt to give you Smalltalk powers in C.
As far as resources go:
- http://c-faq.com/ - The comp.lang.c's C FAQ is one of those things you should read front to back a few times. I've probably read it a dozen times or so. It's that helpful.
- C Unleashed - Once you have the language down, this'll teach you a thing or two about real programming concepts like abstract data types, searching, sorting, algorithmic complexity, debugging programs, digital signal processing, language parsing, etc. Basically, your first step into becoming a real intermediate C programmer.
- The C Programming Language - I would read this last, since by then you'll be a good enough programmer to appreciate the sort of concise, simple book this is. This is more for fun than anything, but it does help you pick up more idiomatic C as it was used early on.
Sorry I don't have an actual reference for learning C, but there's nothing I know of that's well written for beginners. I can only reiterate my advice of learning C and assembly alongside each other, as otherwise you run the risk of "not getting" C even after several years of trying.
EDIT:
Some other possibly useful resource that I probably haven't seen before:
Also, I used to use
this site a lot as a quick reference of handy notes when I was first learning the language.
D'oh! My edition of Learning Python is for Python 2.5.
The differences between Python 3.0 and 2.5 aren't so big that you can't get over them after a good day or two. Go ahead and learn Python 2.5 and then just read what changed in Python 3.0. It's more important to familiarize yourself with computer science concepts and methods than with any specific language, and that takes time.
Python 3.0 won't be the de facto version in most distributions for at least a year or two anyway.
If you're learning Python, you should also experiment with Haskell afterwards. Python has a few really powerful features found in Haskell, but most programmers are only familiar with procedural and object-oriented styles of programming, so they completely overlook them.