I am confused about the error I am getting.
My code is as below:
result = getString(argument_x)
print result # it returns "PASS"
if result ="PASS"
When I try to launch it, it shows an error for the last line:
SyntaxError: invalid syntax
解决方案
Many Python constructs, like if, while, and for, require a terminating colon :, and the lines following must be indented all at the same level.
The indent level is not as important as all statements associated with the conditional must be indented at the same level.
In your case, you were using an if statement:
result = getString(argument_x)
print result # it returns "PASS"
if result == "PASS":
print("Result equals pass")
#Add any other statements here to be executed as a result
#of result == "PASS"