Jun-02-2020, 09:47 PM
Hello,
Here is the code I am trying to improve - can longer lists be read from a file and looped through and printed?
All the Best,
Dave
Here is the code I am trying to improve - can longer lists be read from a file and looped through and printed?
p8262 = [331, 83, 112, 111, 21, 67, 8] p8264 = [384, 84, 119, 74, 28, 51, 6] p8401 = [330, 114, 217, 81, 11, 52, 5] # variables to be looped Sum = sum(p8262) Sum1 = sum(p8264) Sum2 = sum(p8401) print("The sum of p8262 is " , Sum) print("The sum of p8264 is " , Sum1) print("The sum of p8401 is " , Sum2)
All the Best,
Dave