if
statement can be simplified PYL-R1703 97 else:
98 continue
99
100 if guess == secret_word:101 return True
102 else:
103 return False
The highlighted if
block can be refactored into a simplified statement, increasing its readability.
def simplifiable_if(arg, arg2):
if arg and not arg2:
var = True
else:
var = False
return var
def simplifiable_if(arg, arg2):
var = bool(arg and not arg2)
return var