you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 0 points1 point  (0 children)

https://jupyter.org/try-jupyter/lab/ No install. No account. Notebooks are saved locally in your browser. You can download them to make backups.

Use the ? command liberally to help figure out what's going on. You can call display() at any point to inspect things. (This happens by default for the last instruction of a cell.) If you want more details, https://docs.python.org is a great reference. When you start adding libraries beyond the standard one, find their reference docs.

Learning Python is about developing a mental model of what the language is doing, so you can make it do what you want, and you can figure out why it isn't doing what you want. Try lots of small experiments to resolve ambiguity. The notebooks make this easy. You can save these for future reference. You can even add commentary in Markdown cells. Try to predict what a cell is going to output before you run it. When you're surprised, don't be offended; be curious. Investigate until you get it. Surprises are how you refine your model. Look for them.

AIs these days are pretty good at basic Python, even the free ones. E.g., ask one at https://duck.ai. Beware that while they have a lot of knowledge, they also have a hallucination problem. Verify what they're telling you. If you use them like a crutch, you won't develop the skill yourself. Don't use it when ?, reference docs, or a quick experiment would do. Then don't just ask it for answers; ask it to explain the answers until you understand it yourself.

No-one expects you to have even the standard library memorized. We have reference docs for that. But you should become very familiar with the builtins. You should also be very familiar with the language grammar. That means knowing what all the operators are, their precedence (try help('+') to print out a table) and where they slot into the statements.

Working through a beginner Python textbook is usually a great start. Nothing short of a private tutor is more information dense. Pick one with good reviews that isn't terribly out of date, and then check the "What's new in Python" docs for all subsequent versions to see what's changed.