by alm1 · 3y ago · 0 comments
Would it be Random.int()? Or Random.range()? Or maybe there's a better choice that operates directly on a list? Or wait is it gonna return the value or a Generator of the value? Etc. Even if you remember how to do random number generation in your language, this specific use case probably necessitates a Google unless you have a godlike memory, or you don't mind half-assing it.
I don't think googling for library methods is a sign of a bad developer. On the contrary, googling for specific library functions instead of hacking something together using general library functions is a sign of a good developer.
That said, at least for python, I personally wouldn't have to google. I use random.choices a few times a year.