I have a basic Python read statement which seems to be derailed by setting what I think it just a variable... but something else is going on I don't understand.
In my code, if I enable line 2, nothing in the 'for' set runs. It's skipped entirely. I'm unclear why that is when it feels like declaring inp should be unrelated to the successive steps?
fhand = open('rubbish.txt')
#inp=fhand.read()
for line in fhand:
line = line.rstrip()
if line.startswith('junk'):
print('found it')
print(line)
if not line.startswith('junk'):
continue
print('end')
print(type(fhand))