i need to read a file in python. My Problem is, that the file has an alternating amount of columns and that there are comments at the end of each line. I want to get rid of the comments while I read the file and save the data in a array or something like that. I Have absolutely no idea how to do that. Can anyone of you help me? This is how the file looks like:
2.0 # mass
-2.0 2.0 1999 # xMin xMax nPoint
1 5 # first and last eigenvalue to print
linear # interpolation type
2 # nr. of interpolation points and xy declarations
-2.0 0.0
2.0 0.0