assign the condition of the if statement to a variable
assign the condition of the if statement to a variable Question: I have a long snippet of code and i am trying to shorten it. This is what I have now: statuses = cleaned_data.get("statuses") if statuses: for status in statuses: … it would be nice if i can assign the value of cleaned_data.get("statuses") inside the …