(Aug-21-2020, 07:59 AM)barrypyth Wrote: Thank you again Bolofred. The split operation seems to have done the trick with len returning 5. I have attempted to put the 5 numbers into a list withRead and split on
list = [s].
,
in one go,then have a list with with string,than can also do one more step with int()
to get integers if needed.with open('movedata.txt') as f: lst = f.read().split(', ')Test.
>>> lst ['100', '-100', '200', '-200', '200'] >>> [int(i) for i in lst] [100, -100, 200, -200, 200]