I
Ivan Voras
What is the 'most pythonic' way of searching the largest element in a
list/tuple?
My 'standard' idea is:
max = list[0] # or -infinity, or whatever...
for i in list:
if i > max:
max = i
While this is ok, I somehow 'feel' there could be a more concise
solution...
list/tuple?
My 'standard' idea is:
max = list[0] # or -infinity, or whatever...
for i in list:
if i > max:
max = i
While this is ok, I somehow 'feel' there could be a more concise
solution...