I'm trying to get Python to a read line from a .txt file and write the elements of the first line into a list. The elements in the file were tab- separated so I used split("")
to separate the elements. Because the .txt file has a lot of elements I saved the data found in each line into a separate list.
The problem I currently have is that it's showing each list like this:
['Name1', '7.3', '6.9', '6.6', '6.6', '6.1', '6.4', '7.3
']
How can I remove
from the last element of the list and make it just '7.3'
?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…