How To Check If Variable Is Empty In Python For All Selected Lines