rkgautam

max function

Discussion created by rkgautam on Mar 6, 2012
Latest reply on Mar 6, 2012 by curtvprice
Does Python has 'max' function?

I need to find maximum value among hundreds of variables. For example, I have 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 0, 10, 20, etc and I would like to write a code like
max(2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 0, 10, 20) and get the maximu value. I tried, somehow it did not work.

I found a max function in ArcGIS help as
max([!field1!, !field2!, !field3!])

what does ! mean?

Thanks

Outcomes