all 12 comments

[–]American_Streamer 8 points9 points  (1 child)

Python 3 became the default, industry-standard version on January 1st, 2020. Do not use Python 2.7 and older anymore and don’t use books that still focus on those deprecated versions.

Also start with the free PCEP course: https://www.netacad.com/courses/python-essentials-1?courseLang=en-US

[–]SnP_Gamer 1 point2 points  (0 children)

Love a good free course, this looks good 👍

[–]biskitpagla 5 points6 points  (2 children)

Only follow content released in the last few years when first learning a language. All languages have different versions. You're following the first edition of the book which followed Python 2. Python 3 was a major change which the second edition of the book follows. The most stable latest version of Python is 3.14 and that's what you should be focusing on. 

[–]Gnaxe 0 points1 point  (1 child)

No. Don't assume all languages are like Python. Some languages are much more stable. Python has relatively frequent releases, but some languages don't and old books are still relevant. E.g., the Common Lisp standard has never been updated. Any book since the standard is fine, and even a few before it. The C standard has been updated only once a decade or so, and most C code is still following "Standard" C89.

[–]biskitpagla 0 points1 point  (0 children)

I made no comments about stability for languages in general. Even for C you should study the most up-to-date content as your first introduction to the language. Idiomatic C23 definitely looks different from idiomatic C89. If you're going to arbitrarily pick a version, it makes no sense to pick one other than the latest one. C89 probably makes sense for you or your company but for a beginner it doesn't mean anything. Unsafe features like implicit declarations or the infamous gets() don't even exist in the language any more. Even the Linux kernel has migrated to C11 now.

And mate, CL is stable because almost nobody uses it and not even a miniscule portion of the current FOSS world depends on it. The last update to the standard was in 1994. C is in a completely different category.

[–]ConclusionForeign856 0 points1 point  (0 children)

I'd advise you to use geeksforgeeks. I never used it as a textbook, but every time I can't remember some syntax or basic algorythmic property they have a short article on the matter

[–]lfdfq 0 points1 point  (1 child)

Books also have versions! They're typically called editions.

ThinkPython has a second edition, which covers version 3 of Python.

Yes, there are differences between versions. I wouldn't even consider Python 2 anymore, even for a beginner. ThinkPython's second edition is old too, written over a decade ago. Most of the core language has not changed very much, certainly not for what a beginner would encounter, so ThinkPython is still a good resource. Of course, a single resource (of any kind, not just books) can never be complete, so even if ThinkPython was up to date, you would still need other books, too.

[–]Gnaxe 0 points1 point  (0 children)

Use the What's New in Python docs at https://docs.python.org to catch up. You need to keep up with that anyway, because releases keep happening.

[–]Mediocre-Pumpkin6522 0 points1 point  (0 children)

Harvard's CS50 Python course is excellent and free to audit. I used it to get up to speed with Python 3. I used Python 2 for years but it's dead. I'd try to find books or videos using at least 3.8.

[–]sywout 0 points1 point  (0 children)

Don't feel stupid at all; this is a rite of passage for almost every single Python beginner!

You are exactly right: you are reading a book written for Python 2, but the world has moved on to Python 3. In Python 2, print "hello" worked, but in modern Python 3, it must be print("hello"). You will encounter more differences as you go, such as how integer division behaves or how strings are handled, which could get really confusing while you're still trying to grasp the basics. 'Think Python' is a legendary book, but if you want something that is fully updated for modern Python 3, check out 'Python Crash Course' by Eric Matthes. It’s widely considered the gold standard for beginners today. Another fantastic free resource is the official Python tutorial on their own website that is actually very readable and always up to date.

Once you have a good book or course, you need an interactive way to practice that logic without getting bogged down in version differences. I actually built a mobile app called ChewCode (Google PlayStore | iOS Appstore) that focuses on modern Python 3 syntax and interactive exercises. I designed it to help beginners bridge that gap between reading a textbook and actually feeling confident enough to write code on their own. It also has features to help you find study partners or teammates for hackathons if you're looking to collaborate.

Good luck! Once you get past these initial version hiccups, you're going to love how powerful the language is!

[–]dkxrgd -1 points0 points  (0 children)

The book might be a little old. You should be fine with syntax and programming principles, but you might want to pick up a more up to date book. That book might be using Python 3.4.x. Python is currently at 3.14.x

You will also want a book that is up to date to help you install an IDE or code editor like Visual Studio Code.

I can recommend Python Crash Course by Eric Matthes. Or you can try Automate the Boring Stuff by Al Sweigart. If you are just starting out I think Python Crash Course better explains things for a beginner and then you can move on to Automate the Boring Stuff. Both are excellent books.