title: Find consecutive integers in a list
body: <p>I am trying to find consecutive values from an unsorted list. Experimental code below:</p>
  <pre><code>num = [8, 9, 4, 1, 2, 3]
  
  #(num[0+1])  next value
  
  for i in range(len(num)-1):  # not using -1 will cause index error
      if num[i]+1==num[i+1]:
          print('Con',num[i])
  </code></pre>
  <p>Problem: I am unable to get the last value with this current code. My output excludes the last value. Here is what I get (no 9 or no 3):</p>
  <pre><code>Con 8
  Con 1
  Con 2
  </code></pre>
  <p>I have seen a few complex solutions which were a little difficult for me to understand. Is it possible to tweak the for loop part a little and get the entire sequence? Thanks a lot.</p>