Ah, I see the rational of mis-detection. So: if line.split()[0] in ('kernel', 'linux'): newkernel = line.split()[1].strip('./')
Should satisfy that requirement? Split strips leading whitespace. We could even introduce a temp variable to hold line.spit() list.....
Ah, I see the rational of mis-detection. )[1].strip( './')
So:
if line.split()[0] in ('kernel', 'linux'):
newkernel = line.split(
Should satisfy that requirement? Split strips leading whitespace.
We could even introduce a temp variable to hold line.spit() list.....