Daftar Python ke byte

# Use 'bytes' constructor
a_list = [1, 2, 3]
list_as_bytes = bytes(a_list)
Panicky Pigeon