I have a for loop and within that there is a simple single line if condition. I want to use continue option in the else part.
This does not work :
def defA() : 
    return "yes"
flag = False
for x in range(4) : 
    value = defA() if flag else continue
                              ^
SyntaxError: invalid syntax
Working code :
for x in range(4) : 
    if flag : 
        defA()
    else : 
        continue
 
     
     
     
     
     
    