title: How do I read the codes of a .dat file(binary file) in Python?
body: <p>my friend mailed me a binary file "Masters.dat" coded in Python.I want to read the codes inside the binary file,so how do I do it?</p>
  
  <p>I have tried :-</p>
  
  <pre><code>file = open("C:\Users\Samanyou\Desktop\Source_XII\Project\Masters.dat", "rb")
  
  read=file.readlines()
  
  print read
  </code></pre>
  
  <p>But this gives me the result in ASCII or something else but not in human readable form.</p>