How To Write Data Into Excel File In Python Using And In If Statement