Python How Do I Remove Unwanted Additional Empty Lines After Adding

Python How Do I Remove Unwanted Additional Empty Lines After Adding