Think Python 2e
greenteapress.com
greenteapress.com
Something to download, bookmark and throw at people when asked about how to get started.
Back in the day, single-digit years old me had to make-do with AmigaBASIC's manual, which shipped with the Amiga 500. A lucky kid who had a computer at home. It was sufficient to bootstrap my career.
These days, it is all so much more accessible, and yet.
How about a "learn Python if you got your comsci degree with C 20 years ago but are now in hands off management role" though? :-) I don't need to learn what a variable is for 20th time, but can't jump into "advanced Python" books either, so I've found myself stuck a bit between two extremes.
0: https://chinesememe.substack.com/i/103754530/chinesepython
I think it's reasonably analogous to how learning worked without an AI buddy, but it's faster because unlike using search engines for help, you don't have to navigate a space that's weaponized against your attention to find the next useful bit.
In python a variable is just a name. Assigments change what object this name references. But nobody is ever going to change which object this name references, unless you do it yourself. They can mutate the object, but not the name, if that makes sense.
you don't read a book about hammers before you hit a nail
Someone who doesn’t know how to code could probably use even a bit more of an intro.
Not that I oppose picking it up and trying it. But (a) try asking for help on the internet when you haven't rtfm yet and see how it goes (b) personally I love reading about programming languages I'll probably never use... I've never written a line of scheme in my life but SCIP still taught me a lot; and it's always interesting to see the different ways of doing things. (c) there's a reason the word pythonic exists. It's particularly interesting to see the python way of doing stuff, again, even if you don't code in it.
It won't all stick, obviously, until you do a real project, but reading is never a bad idea.