How to interate over N lines of a text file in Python
问题 Hello I'm trying to convert the file disp.txt from: 116 C 0.12 -0.91 0.39 -0.40 0.31 0.85 -0.66 -0.18 -0.22 117 O 0.00 -0.02 0.00 -0.05 0.05 0.12 -0.57 -0.26 -0.29 116 C -0.03 -0.04 0.00 0.01 0.09 0.19 -0.71 -0.21 -0.26 117 O -0.14 0.88 -0.45 0.47 -0.33 -0.79 0.57 0.16 0.19 to disp.mol: vibration 1 0.12 -0.91 0.39 0.0 -0.02 0.0 vibration 2 -0.4 0.31 0.85 -0.05 0.05 0.12 vibration 3 -0.66 -0.18 -0.22 -0.57 -0.26 -0.29 vibration 4 -0.03 -0.04 0.00 -0.14 0.88 -0.45 vibration 5 ... I opened the