Simplify Python OR conditions with sets

Stop writing long OR conditions in Python # Beginner if name == "Sumit" or name == "Sumi" or name == "Sumeet": ... # Pro if name in {"Sumit", "Sumi", "Sumeet"}: #Python #PythonProgramming #LearnPython #PythonTips #PythonDeveloper ...

To view or add a comment, sign in

Explore content categories