title: Get the maximum value from an array without the max() function in python
body: <p>I want to pick the max valued number from and integer array. This is quite easy in python.</p>
  
  <pre><code>arr = [10,40,30,326,673]
  print(max(arr))
  </code></pre>
  
  <p>But I actually want to know the behind the scene of this <code>max()</code> function. How does this pull the maximum value from an array?
  How can I pull the maximum value from an array manually?
  Here is my full code:</p>
  
  <pre><code>stdName = ["X"]
  stdMark = [0]
  Pass = ", Passed"
  Fail = ", Failed"
  stdNum = int(input("Enter number of students: "))
  while len(stdMark) &lt;= stdNum:
      name = input("Enter student name: ")
      mark = int(input("Enter student mark: ")
      if mark &lt; 0 or mark &gt; 100:
          print("Enter mark between 0 to 100")
      else:
          stdName.append(name)
          stdMark.append(mark)
  for i in range(1,stdNum+1):
      if stdMark[i] &lt; 60:
          stdName[i] = stdName[i] + Fail
          print(stdName[i])
      else:
          stdName[i] = stdName[i] + Pass
          print(stdName[i])
  print(max(stdMark))
  </code></pre>
  
  <p>I want that <code>print(max(stdMark))</code> to be done manually without the <code>max()</code> function.</p>