import sys my_list = [] if not my_list: print('my_list is empty!') else: print('my_list is not empty!')