3 ms·
I assume you meant using leetcode's editor without type checking then yeah, there's much less benefit using type hints there. In my vscode setup with mypy stri
by squaresmile 6y ago
I assume you meant using leetcode's editor without type checking then yeah, there's much less benefit using type hints there.
In my vscode setup with mypy strict, pylance basic and python 3.9 though, type hints all days for me. I personally forget the arguments types like 1 second after I write the function. Maybe I'm conditioned by typed python.
Leetcode codes usually have simpler data structure and without 3rd party libraries so that's even easier to add types for.
Edit: Oh looks like Leetcode python code template has type hints