I find the need for that regularly. And I use the obvious syntax which
everyone else uses:
if not seq:
print("This page is intentionally left blank")
else:
for i in seq:
...
Not so easy for an iterator though.
I’m more likely to do something like this:
Page = NewPage()
For content in iterable:
Page.Add_stuff(content)
If not Page:
print("This page is intentionally left blank")
(Sorry For the non PEP8 compliant capitalization— damn phone)
-CHB