Python find the minimum using for loops? [closed]
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I don't know how to make python "scan" through the list for a candidate and then go back to the loop again to find another candidate for the min. candidate = 0 maximum = 0 a = [12, 10, 50, 100, 24] for i in len(s): for j in range(len(s)): 回答1: You can use the builtin min function to do this a = [12