How to create bytearray from list in Python

1 Answer

0 votes
lst = [1, 0, 255, 65, 97, 122]

ba = bytearray(lst)

for value in ba:
    print(value)

   
   
   
'''
run:
 
1
0
255
65
97
122
    
'''

 



answered Sep 15, 2020 by avibootz
...