Send Close Add comments: (status displays here)
Got it!  This site "www.robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Python: Comparison operator chaining
by RS  admin@robinsnyder.com : 1024 x 640


1. Python: Comparison operator chaining
In CS 101, one learns that languages (such as C, Java, etc.) do not accept the following.
if (min1 < i1 <= max1) { ... }

Welcome to Python, where the language is adapted to the programmer instead of the programmer to the language. Here is the Python code [#1]

Here is the output of the Python code.




2. End of page

by RS  admin@robinsnyder.com : 1024 x 640