ParentFull thread9nGQluzmnq3M·Not as elegant, but way more readable:if num > max: num = maxif num < min: num = minView on HN