What do you like more
Simple question regarding style, I don’t believe there is a right answer just curious because I had a disagreement with a colleague at work about this.
- flag = False if var in [“str1”, “str2”] else True
- flag = var not in [“str1”, “str2”]