check if list is empty python else assign code example Example: check if empty item in list python if '' in list: # do stuff