title: ValueError: min() arg is an empty sequence
body: <p>I'm current coding a highway traffic model. On the deciding the distance between the front car, I'm stuck at min(). It somehow an empty sequence.</p>
  
  <blockquote>
    <p>Traceback (most recent call last):</p>
    
    <p>[93, 72, 55]</p>
    
    <p>File "C:/Users/Try Arie/PycharmProjects/traffic_model/traffic.py", line 44, in </p>
    
    <p>55</p>
    
    <p>[]</p>
    
    <p>d = min(dlist)</p>
    
    <p>ValueError: min() arg is an empty sequence</p>
  </blockquote>
  
  <p>I checked the value of distance list. It should be inside and using min(), I will assign the lowest value to d. But it doesn't</p>
  
  <pre><code>class car:
  
      def __init__(self, no, x, v):
          self.no = no
          self.x = x
          self.v = v
  
  
  for i in range(N):
      cars.append(car(i+1, randint(0, 100), 0))
  
  for i in range(N):
  
      dlist = []
  
      for j in range(N):
          if cars[j].x &gt; cars[i].x:
              dlist.append(cars[j].x)
  
      print(dlist)
  
      d = min(dlist)
  
      print(d)
  </code></pre>
  
  <p>I want value d 55, so then I can use it for my next code</p>