Feb-20-2020, 12:19 PM
Use .split() to split on the space (look it up). Convert to a list of numbers. Use len(the list) for your count. Loop and add to get the sum. Do this for each line in the file.
You are having trouble getting started but the loop can be done through a "list comprehension". Once you have solved it look that up to see how your loop could be condensed to a single line.
You are having trouble getting started but the loop can be done through a "list comprehension". Once you have solved it look that up to see how your loop could be condensed to a single line.