You are viewing a single comment's thread. Return to all comments →
A little bit of built-in functions will handle the job:
if any([n in range(6, 21), n % 2]): print("Weird") elif any([n in range(2,6), n > 20]): print("Not Weird")
Seems like cookies are disabled on this browser, please enable them to open this website
Python If-Else
You are viewing a single comment's thread. Return to all comments →
A little bit of built-in functions will handle the job: