encode - Python string to bytearray and back -


how can convert human readable string bytearray , back?

say have "hello world" , want bytearray , bytearray same string?

you can use bytearray():

b_array = bytearray('yoyo') elem in b_array:     print elem 


to convert b_array string format use .decode():

for elem in b_array.decode():     print elem 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -