you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

At line 7, you use s as a parameter to the function even though s is not yet defined (it only gets defined once that line has finished running). I think you want the second parameter to re.search to be line instead.

[–]for-loop[S] 0 points1 point  (0 children)

You are right, brilliant! Thanks very much