By - FeedInteresting810
Documentation is how you know what is available for you to use.
Question: How do you know that the Python build in type `string` has a `.replace(old, new)` that returns a copy of a string with all occurrences of substring `old` replaced by `new`?
Answer: You search the documentation of Python and find this list of string methods:
Now you know you don't have to code your own string replace method, because one already exists.
Most languages, libraries, frameworks and tools have accompanying documentation that lists what is available, what it does, what to provide and what you will get back as the result.
In fact, I see a lot of questions on here that could be answered by a simple google for the docs, rather than posting here and waiting for a reply. Docs are something that beginners should be made aware of and should consult often. That's why I'm a fan of linking to the docs on here, to show people where the answers are.
documentation is some notes that describe what functions & methods do and often how to use them correctly. when you're looking at a library that you've never used before the docs are really useful for quickly learning what it offers & how to use it
> I read the python documentation after reading that but it looked very cryptic and it didn’t make sense to me .
you're a month into learning, just keep at it and the docs will eventually make more sense. the python docs are quite decent, getting familiar with them is just part of the learning curve
If it helps, when I started too, it was at first difficult and I was learning from different sources and after a while, I just looked it up one day and it made a lot of sense. Now, I enjoy reading it and python especially is incredibly smooth and easy to read.
All the best mate!
We'll never know, it's ONI after all😂!
Documentation is like an instruction manual for a language, library, module, etc. It's super helpful to learning what functions and methods are available for whatever you are using.
For example, if you need to manipulate a `list` a particular way for some code you're writing, well, you can open the Python documentation and find all the built in methods for lists. There may be a method built in to the language that does exactly what you need, and then you can use that method, which results in less work for you writing your own custom function and logic, and also makes your code more Pythonic.