Apr-21-2017, 01:05 AM
I would:
- Read them in as strings
- Split them into timestamp vs. data with string slicing
- Create a dictionary, with the timestamps as the keys, and the values being lists of the data for that timestamp.*
- Append each data point to the list for the appropriate timestamp
- Once all the data is read, get the keys into a list and sort it.
- Loop through the list, writing the keys and the data out to the file.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures