Created
July 26, 2008 03:10
-
-
Save ishikawa/2591 to your computer and use it in GitHub Desktop.
Iterates Over The Bytes Of String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array | |
for byte in array.array('B', "ABCDEFG"): | |
print byte # prints 65, 66, 67, 68, ... and so on. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment