if the data in the text file has is less than 10 (for example 4,2,3,1) it will sort the data accordingly. However, if the data is more than 10 (for example (3,199,4,5), it will sort to 199,3,4,5 instead of ascending order. Please help
def readFile():
try:
fileName = open("haha.txt",'r')
data = fileName.read().split()
data.sort()
print(data)
except IOError:
print("Error: File do not exist")
return