python if list empty or contains values code example Example: check if empty item in list python if '' in list: # do stuff