How to convert list to tuple and search for max and min
<p>I am currently learning python coding and I come across this qns on a learning site:</p>

<p>Create a function that takes a sequence of inputs (may be a list, a tuple, or just a bunch of inputs).  The function should return the minimum and the maximum of the list.</p>

<p>This are some of the test values that are using:</p>

<blockquote>
  <blockquote>
    <blockquote>
      <p>minmax(5,4) 
      4,5 </p>
      
      <p>minmax(5,4,8,3,5,7,4)
      3,8 </p>
      
      <p>minmax([5,4,6]) 
      4,6 </p>
      
      <p>minmax(5.1,4.2,68.34,129.1,-90.3) 
      -90.3,129.1</p>
    </blockquote>
  </blockquote>
</blockquote>

<p>And I had tried doing it this way but when the parameter is a list, I can't seems to convert it into a tuple and find the max and min.
Here is what I had tried:</p>

<pre><code>def minmax(*a):

    b = tuple(a)

    minNum = min(b)

    maxNum = max(b)

    c = (minNum, maxNum)

    return c
</code></pre>

<p>When a list is taken in, the return result is <code>([5, 4, 6], [5, 4, 6])</code></p>
