"Python String Emptiness Test"
=> What's the most self-explanatory and safest way of checking if a Python string is empty?
Not a simple question, unfortunately, and no universal answer.
@x_cli len(string_in_question) == 0?
@r000t That's only of one the possible answers :) Your proposal was my first answer. Then, I thought about the other ways :)
@bcl @r000t A string, or any object that implements __len__
That's my point on the third answer ;)
A Mastodon instance for info/cyber security-minded people.