I have a text file that contains this: List of values 531 70 5 17 22 876
What I am trying to do is merge sort those values. I know the code to merge sort an array but I am just having trouble putting it into an array. Here is my code.
f = open("testNumbers.txt", "r")
lines=f.readlines()
When I run it I get: ['List of values\n', '531\n', '70\n', '5\n', '17\n', '22\n', '876']
How do I remove everything and just leave me with numbers? Thank you