number read and output
问题 Ok I'm having a little trouble I can get the program to read all the integers but now I'm confused how to get the program to read that is odd or even then add only odd and only even, giving totals for both def main(): myfile = open('numbers.txt','r') for line in myfile: print(line) myfile.close() myfile=open('numbers.txt','r') num1=int(myfile.readline()) num2=int(myfile.readline()) num3=int(myfile.readline()) num4=int(myfile.readline()) num5=int(myfile.readline()) num6=int(myfile.readline())