56
submitted 11 months ago by ChrisLicht@lemm.ee to c/python@programming.dev

I am at a high-beginner/low-intermediate level in Python, and one thing that drives me nuts is how poorly I am able to read the Python official documentation and grok how to use the described code.

What's the secret? Are there any guides/videos/books that can help my understand how to approach reading it? Or, is it just one of those things that I need to just keep coming back to while coding, and eventually I will get the hang of it?

you are viewing a single comment's thread
view the rest of the comments
[-] thisisnotgoingwell@programming.dev 1 points 11 months ago

I recommend getting very familiar with pythons help(), dir() and type() functions. The help function almost always includes examples for the methods you're trying to use, tells you what arguments it expects, and what arguments are passed by default. The type function can help you understand the inheritance of OOP and what type of object you're looking at, and dir on that object will tell you what attributes/methods are defined for your object type.

Other than that, find some good books. I'm a big fan of Michael Driscoll's Python 101 and 201 books.

this post was submitted on 27 Aug 2023
56 points (98.3% liked)

Python

6127 readers
14 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS