Hey, I'm on the rookie side, to Python, and Pygame and new to this community, and I'm confused if this could be possible; I want to change the data type of a list, in Python, from strings to integer (they have to be integer, because I need to sort them numerically afterwards).
This is what I have:
fil2 = open('scrs.dat', 'r') reads = fil2.read() splits = reads.split('=') print(splits)
That is what it outputs, but of course the data type is string; the function of this code is to read data which is wrote previously to the file so to store high scores for my game. And I'd want to sort them in numerical order, so is there any method of changing each value to an integer in the list?