I am not sure where this works, but it is clear that orig_numberit is not int. When you read material from a file and then do strip()/ splitlines()on it, you return a list of lines.
Therefore, in a loop for testis a string, and therefore is orig_numberalso a string.
str, orig_number int, , str orig_number. :
import sys
with open(sys.argv[1], 'r') as input:
test_cases = input.read().strip().splitlines()
for orig_number in test_cases:
iteration = 0
while True:
if orig_number == orig_number[::-1]:
print iteration, orig_number
break
iteration += 1
orig_number = str(int(orig_number) + int(orig_number[::-1]))