I am completely new to Python as I have one specific task that I want to complete. I have a large dataset of .XY files (essentially .txt files), each of which has a header of 23 lines. I wish to use Python (Python 3.7, through visual studio code) to remove the header from all files (either delete from the original files, or write to new files) with the same format as the original file. An example of the top of a file I wish to edit is shown below:
# Distance Sample to Detector: 0.3004918066158592 m
# PONI: 1.261e-01, 1.147e-01 m
# Rotations: 0.000061 0.000011 -0.000000 rad
#
# == Fit2d calibration ==
# Distance Sample-beamCenter: 300.492 mm
# Center: x=1529.147, y=1680.772 pix
# Tilt: 0.004 deg TiltPlanRot: 169.652 deg
#
# Detector Detector Spline= None PixelSize= 7.500e-05, 7.500e-05 m
# Detector has a mask: False
# Detector has a dark current: False
# detector has a flat field: False
#
# Wavelength: 4.1069000000000004e-11 m
# Mask applied: None
# Dark current applied: None
# Flat field applied: None
# Polarization factor: None
# Normalization factor: None
#
# 2th_deg I
1.441032378E+00 -3.563451171E-01
1.447230367E+00 1.410741210E-01
1.453428356E+00 6.531007886E-01
1.459626345E+00 1.176007986E+00
1.465824333E+00 1.784591913E+00