title: How to use lambda with two parameters to find the element with the highest value?
body: <p>I was given a task which was to find the largest value in a list using a lambda function. With the lambda function, I must have two parameters and I am having a hard time how to retrieve elements from a list to use in a lambda function.</p>
  <p>I understand how to perform the task by defining a function but I do not know how to translate that to a lambda function.</p>
  <pre><code>myList = [1,2,3,4,5,6,7,8,9,10]
  
  #Here I can find the max value by defining a function
  
  def maxVal(list_a):
  
     max = 0
  
     for i in list_a:
  
         if i &gt; max:
            max = i
     return max
  print(maxVal(myList))
  
  #Here I attempt to use a lambda function to find the max value
  
  maxMyList = map(lambda x,y: x[0] &gt;= y[0], myList, myList)
  
  print(maxMyList(myList,myList))
  </code></pre>
  <p>Edit: Sorry for any confusion as this is my first time posting here. Just for clarity, I CANNOT define any functions for use in this program. I just wanted to post the code for the defined function maxVal to show that I understand the logic of what I need to do. Thank you for all of your responses, I really appreciate it!</p>