Nagy László Zsolt wrote:

> I can figure out way for example this:
> 
> >>> b'T'+bytearray([32])
> 
> but it just don't seem right to create a list, then convert it to a byte
> array and then convert it to a binary string. What am I missing?

By the way, you can repeat bytes (and strings) by multiplying: 

>>> b"\x01"*3
b'\x01\x01\x01'
>>> b"ab"*3
b'ababab'


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to