Make xrange iteration more efficient by only testing an updated counter when
obtaining each new value instead of testing if the value is within the range.
1fromsysimportstdin 2 3print"Reading 10 bytes..." 4s=stdin.read(10) 5prints 6 7print"Reading to end of file..." 8s=stdin.read() 9prints