We Recommend

Learning Python Learning Python
The authors of Learning Python show you enough essentials of the Python scripting language to enable you to begin solving problems right away, then reveal more powerful aspects of the language one at a time. This approach is sure to appeal to programmers and system administrators who have urgent problems and a preference for learning by semi-guided experimentation.


Posted By

ishikawa on 05/15/08


Tagged

python String


Versions (?)


iterates over the bytes of string


Published in: Python 


  1. import array
  2. for byte in array.array('B', "ABCDEFG"):
  3. print byte # prints 65, 66, 67, 68, ... and so on.

Report this snippet 

You need to login to post a comment.