title: Keep getting a ValueError: not enough values to unpack (expected 2, got 1)
body: <p>My assignment:</p>
  
  <blockquote>
    <p>Write a short Python function, minmax(data), that takes a sequence
    of one or more numbers, and returns the smallest and largest numbers,
    in the form of a tuple of length two. Do not use the built-in
    functions min or max in implementing your solution.</p>
  </blockquote>
  
  <p>Here's the code:</p>
  
  <pre><code>def minmax():
      data = input("Enter a list of any input &gt; ")
      max, min = data[0]
      for x in data:
          if x &gt; max:
              max = x
          elif x &lt; min:
              min = x
      print (max, min)
  minmax()
  </code></pre>
  
  <p>This gives me <code>ValueError: not enough values to unpack (expected 2, got 1)</code>.
  How do I fix this?</p>