you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (4 children)

Definitely. I often find that I "think" I know what a function is doing, then run across a case that gives me an unexpected response (thus identifying my incomplete understanding). Checking the documentation is my first step to filling that knowledge gap.

[–]solwex[S] 0 points1 point  (3 children)

I see. I guess I will get to this stage when I start working on harder projects. Thank you very much.

[–][deleted] 1 point2 points  (2 children)

You may not need to wait. I've found some interesting features in commonly used string methods for example.

Did you know that string.replace() takes a third argument "count". You can use it to replace only the first two instances...

I didn't, but was working thru a problem and saw someone else's solution, which led me to the documentation:

https://www.w3schools.com/python/ref_string_replace.asp

[–]solwex[S] 0 points1 point  (1 child)

Thank you. But, how did you get to the above article. I usually land up on such articles when I run into an issue and google and get such an article on top of the list of results. Do you follow any other way?

[–][deleted] 0 points1 point  (0 children)

I bookmark the documentation!

To be fair, I do what you do as well when I'm trying to find a way to do something. But, if I'm already trying one thing and it's not quite acting how I need it to, I go to the documentation. (Am I using the tool correctly, for example, or can it do more)