mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
clean of unnecessary checks, imports, calls (#7993)
This commit is contained in:
@ -24,8 +24,7 @@ def find_min(nums: list[int | float]) -> int | float:
|
||||
raise ValueError("find_min() arg is an empty sequence")
|
||||
min_num = nums[0]
|
||||
for num in nums:
|
||||
if min_num > num:
|
||||
min_num = num
|
||||
min_num = min(min_num, num)
|
||||
return min_num
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user