Byte-operations.
GMane Python
s_david_rose at hotmail.com
Thu May 19 14:07:31 EDT 2005
For anyone who cares out there, I tried a slice with hex values:
IDLE 1.0.3
>>> a
=['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17
','18','19','20']
>>> print a[3:4]
['4']
>>> print a[0xa:0xc]
['11', '12']
>>> print a[0xa:0xa+5]
['11', '12', '13', '14', '15']
-Dave
"Jeff Epler" <jepler at unpythonic.net> wrote in message
news:20050519122728.GA18155 at unpythonic.net...
>In Python, "chr" gives a 1-byte string from a small integer, "ord" does
>the reverse. Strings are concatenated with "+" and substrings are taken
>with the slice operator, s[pos1:pos2].
>I'm not a visual basic expert, but it looks like these are the
>operations the code below performs.
>Jeff
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list