Hi, I am new to phyton and now I have some problems in terminating my while loop.
This loop runs infinitely, I tried to print both count and N and yes, the value of count does go way beyond N but the loop is never terminated. I am guessing this is because I am getting N from command line and count is initialized inside the program so their 'type' does not match.
Any ideas how to terminate this loop?
if len(sys.argv) == 3 :
infile = open(sys.argv[2])
N = sys.argv[1]
count = 0
while count < N:
s = infile.readline()
print s
count = count + 1
infile.close()
Thank you