max
builtin PTC-W0042It is unnecessary to use an if
statement to check the maximum of two values and then assign the value to a name.
You can use the max
built-in do do this. It is straightforward and more readable.
Not preferred:
if value <= 10:
value = 10
Preferred:
value = max(value, 10)