squares = [x * x for x in range(10)]
print(min(squares))
print(max(squares))
this one works and looks good. squares = [x * x for x in range(10)]
print(min(squares))
print(max(squares))
this one works and looks good.Like posted elsewhere, tee is an appropriate solution that preserves the generator's benefits over a list. It's too bad that the example is so synthetic.