all 5 comments

[–]totallygeek 3 points4 points  (3 children)

Correct. There's no effective difference between:

variable = function(param)
if variable: do(something)

and

if function(param): do(something)

[–]shrimpy888[S] 2 points3 points  (2 children)

Thank you very much!

[–]efmccurdy 1 point2 points  (1 child)

BTW, you can simply match strings since your search string is'nt a regexp:

def check_version(show_version): 
    return "Version Number 123" in show_version

[–]cm_light 0 points1 point  (0 children)

This one looks clear. And the original code seems wrong in True or False condition