bytearray_construct.py 153 B

123456
  1. # test construction of bytearray from different objects
  2. # bytes, tuple, list
  3. print(bytearray(b'123'))
  4. print(bytearray((1, 2)))
  5. print(bytearray([1, 2]))