title: How do you change every character in a file into its ASCII number? Python
body: <pre><code>with open('s.txt', 'r') as f: s = f.read() 
  
  for word in s:
  
      val = ord(word)
  </code></pre>
  
  <p>I'm trying to convert every character in the text file into its ASCII number, however it is only displaying one number when printed. Thank you.</p>