Dmitry Groshev <[email protected]> writes: > which looks almost like a natural language. But there is some > pitfalls: > if x in range(a, b): #wrong! > it feels so natural to check it that way, but we have to write > if a <= x <= b
For the record, you have to write:
if a <= x < b:
Ranges are open on the ending side.
--
http://mail.python.org/mailman/listinfo/python-list
