Medium
Supporting the in Operator
Write
class Range2 for whole numbers from lo to hi (inclusive) with __contains__ so that x in r works, and __len__. Read lo and hi, print the length, then for each query number print whether it is in the range.Input
lo hi; then queries on one line.
Output
Lines.
Sample 1
Input
1 10 5 0 10
Output
10 True False True
Sample 2
Input
3 3 3 4
Output
1 True False
Output appears here