Yong Cui
1 min readJan 22, 2020

--

You’re absolutely right. Using isEmpty is the best practice.

I guess the point I wanted to make is that for certain situations (e.g., array’s count), isEmpty doesn’t outperform count, of which many people may have a misconception.

--

--

Yong Cui
Yong Cui

Written by Yong Cui

Work at the nexus of biomedicine, data science & mobile dev. Author of Python How-to by Manning (https://www.manning.com/books/python-how-to).

Responses (1)