<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: max function in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/max-function/m-p/227338#M17634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;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.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it should work. there are two valid syntaxes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; max(3,2,1,5)
5
&amp;gt;&amp;gt;&amp;gt; max([3,2,1,5])
5&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I found a max function in ArcGIS help as &lt;BR /&gt;max([!field1!, !field2!, !field3!])&lt;BR /&gt;&lt;BR /&gt;what does ! mean? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the python max function (second syntax), used inside the Calculate Field tool (which uses a "!" delimeter to substitute field names in to Python expressions).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 11:04:36 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T11:04:36Z</dc:date>
    <item>
      <title>max function</title>
      <link>https://community.esri.com/t5/python-questions/max-function/m-p/227337#M17633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does Python has 'max' function? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a max function in ArcGIS help as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;max([!field1!, !field2!, !field3!])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what does ! mean? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 14:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/max-function/m-p/227337#M17633</guid>
      <dc:creator>RameshGautam</dc:creator>
      <dc:date>2012-03-06T14:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: max function</title>
      <link>https://community.esri.com/t5/python-questions/max-function/m-p/227338#M17634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;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.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it should work. there are two valid syntaxes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; max(3,2,1,5)
5
&amp;gt;&amp;gt;&amp;gt; max([3,2,1,5])
5&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I found a max function in ArcGIS help as &lt;BR /&gt;max([!field1!, !field2!, !field3!])&lt;BR /&gt;&lt;BR /&gt;what does ! mean? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the python max function (second syntax), used inside the Calculate Field tool (which uses a "!" delimeter to substitute field names in to Python expressions).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/max-function/m-p/227338#M17634</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T11:04:36Z</dc:date>
    </item>
  </channel>
</rss>

