title: Translating Python to C
body: <p>I have an important project to write but there is a problem: I have to do it in C from Python (I absolutely do not know well Python..)</p>
  
  <p>I've translated almost 70% of the code but because of one line of code I can't complete it so I really hope for someone to help me..</p>
  
  <p>here is the line in question: </p>
  
  <pre><code>define1 = '\x0F\x10\x20\xD6'
  
  def function(file):
    if file[i:i+4] == define1:
      [...]
  </code></pre>
  
  <p>(with <code>file</code> which is supposed to be a binary), and I absolutely don't know how write this <code>file[i:i+4]</code> in C (I assume it can be done using arrays and pointers but that's all...).</p>
  
  <p>Thanks in advance.</p>