quick list question, if no items remaining

Hi I have a quick question about list.

I know how to access list items and the next item in the list.

 
If nextiteminlist = this item
     do this

I would like to do something if there are no items left in the list but I do know the syntax…

 
if ????(nothing left in list)
    do this

I just dont know what to put behind my if to access this.

Thanks for any help

if len(list) == 0:
     # Do something

if len(list) == 0:
_____# Do something

thats it…ty

Or just do if not list :

PEP#008 recommends Agoose method:


if not myList:
  # your code

It checks for None and empty list.