This website contains age-restricted materials including nudity and explicit depictions of sexual activity.
By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.
Yes, the first example does the same thing, but there’s still less to mentally parse. Ideally you should just use
if len(mylist) == 0:
.